Method Dispatch in Swift | Static | Dynamic | Message

Поделиться
HTML-код
  • Опубликовано: 29 сен 2024

Комментарии • 63

  • @arunmalik4737
    @arunmalik4737 3 года назад +5

    Good Explanation...Have one question?
    Why swift using static dispatch in Extension irrespective of value type and refrence type data type?

    • @iCode_Happy_Coding
      @iCode_Happy_Coding  3 года назад +7

      Hi Arun, thanks for watching the video and following it this closely.
      The one word answer to your question would be 'Optimisation' or 'Performance Enhancement'. I understand that this is not satisfying, and I can't explain the complete concept here in the comment (may be I'll make a separate video for it).
      But for now, you can have a look at this article 👇🏼
      medium.com/@PavloShadov/https-medium-com-pavloshadov-swift-protocols-magic-of-dynamic-static-methods-dispatches-dfe0e0c85509
      Hope it helps.

  • @kanerodricks9930
    @kanerodricks9930 Год назад

    Hi @iCode, is virtual dispatch and dynamic dispatch same? Or is it direct dispatch == static dispatch? virtual dispatch == table dispatch and dynamic dispatch == message dispatch?

  • @alihasanoglu5278
    @alihasanoglu5278 3 года назад

    Thanks 👍

  • @ronnie-codes
    @ronnie-codes Год назад +3

    I always wondered why Xcode doesn't default to final when generating a class for you. I always mark a class as final until it is subclassed as a best practice, but Xcode should really do it to help make a statement about best practices at the least.

    • @programming5523
      @programming5523 Год назад +2

      the reason its better to use struct make everything as struct and if needed change to class I heard this from a stanford professor

  • @afaaqahmedsaqi
    @afaaqahmedsaqi 3 года назад +3

    One quick question: So wherever I know that there will be no more subclassing, should I introduce the final keyword to change the dispatch type of methods to static to make execution more speedy?
    Is it good practice if I introduce the final keyword to every class which is no longer going to be superclass in future?
    Maybe two quick questions ;)

  • @programming5523
    @programming5523 Год назад

    if we use @mutating is it a dynamic dispatch and is it table or message can anyone tell me?

  • @pawanmanjani1298
    @pawanmanjani1298 3 года назад +2

    Trust me... Your Awesome... Clear and easy explanation... Keep posting please

  • @educationplus8829
    @educationplus8829 Год назад +2

    Had this topic on my technical interview, couldn't find a better explanation than your video. Thank yo so much!

  • @vladlk2520
    @vladlk2520 2 года назад +2

    Great explanation and illustrations, thanks!

  • @The0l0L0
    @The0l0L0 Месяц назад

    your videos are really helpful thank you 🥲

  • @afaaqahmedsaqi
    @afaaqahmedsaqi 3 года назад +7

    I watch it twice to get full grasp!
    Highly recommended as explaination is crystal clear.

  • @sanjeevreddy1756
    @sanjeevreddy1756 2 года назад +1

    Thanks for this topic and explaination too

  • @rehanismail7082
    @rehanismail7082 3 года назад +1

    technically strong 💪 explanation. I always enjoy your tutorials.

  • @deeprajchowrasia6090
    @deeprajchowrasia6090 5 месяцев назад

    Well explained, you should also add the reference of the medium article , it really help me to get more clarity.

  • @jai6133
    @jai6133 2 года назад

    Is message disptach use the witness table to identify the function pointers ?

  • @salmansiddiqui9522
    @salmansiddiqui9522 2 года назад

    Do we need to mark ViewControllers final to make efficient ?

  • @ShuklaAmbuj
    @ShuklaAmbuj 2 года назад

    Well explained Pallav, just Message Dispatch is not clear compared to other which are really explained very well, thanks for the awesome videos.

  • @romanromanenko9520
    @romanromanenko9520 5 месяцев назад

    Cool! Thank you for the explanation

  • @HumbleHustle101
    @HumbleHustle101 Год назад

    Nice video Palav. Can you also make a video about pair coding test and how to prepare for it?

  • @612SUNIL
    @612SUNIL 2 года назад

    Thank you Pallav for making this video. Your videos help me a lot to understand the concepts. Keep sharing your valuable knowledge with us.

  • @gamingwithsaanvi4779
    @gamingwithsaanvi4779 2 года назад

    Very well explained...keep sharing your knowledge, thanks

  • @hardipgajera2316
    @hardipgajera2316 2 года назад

    Hello, Pallav am Hardip iOS dev I have a few queries, please answer me

    I am an ios dev with around 1.5 years of experience I know all basic things like JSON parsing and database handling which are required for all companies in my town

 But I know there is some advanced topic many of them you have created videos like SSL pinning, dependency injection and many more. I don’t know even the name of them thanks for your channel and you.
    I request you to please tell me how can I know all the topics in advance ios development because I want to not bound myself with this very basic lifecycle of iOS development

Please suggest to me how can I learn those things and please suggest me best resource for that.

    • @iCode_Happy_Coding
      @iCode_Happy_Coding  2 года назад +1

      Hi Hardip,
      Can you DM me on LinkedIn? We can have a chat there.

  • @sarikapaghdal6150
    @sarikapaghdal6150 2 года назад

    your videos are very detailed explained and don't create confusion as you are not going here and there in Xcode!

  • @DhavalHNena
    @DhavalHNena 2 года назад

    Thanks Pallav for this great content! it really helps understanding such uncommon concepts which is not directly related to day to day programming. Thanks a lot!

  • @saurabhsierra9195
    @saurabhsierra9195 3 года назад

    Great...nice ... thanks for this...keep posting knowledgeable articles like this...good work.

  • @puneetpal1466
    @puneetpal1466 3 года назад

    Again many many thanks for such content and beautiful explanation 👏

  • @sangeethabijoor9904
    @sangeethabijoor9904 2 года назад

    Thank you for this video. Very good explanation

  • @avantiparanjape9317
    @avantiparanjape9317 2 года назад

    Great video! A quick snapshot to a topic which can be ignored easily.

  • @begumkrkgoz8123
    @begumkrkgoz8123 3 года назад

    Thank you for your efforts. That is very useful and understandable.

  • @harinderrana7829
    @harinderrana7829 3 года назад

    Very well explained and different content from other channels 👍

  • @rushabhsingh2148
    @rushabhsingh2148 3 года назад

    In case of extension, where and how does extension method gets appended in witness table?

    • @BuferQ
      @BuferQ 3 года назад +1

      Extension's methods do not append to the witness table. Static dispatch is used for them

  • @Cdswjp
    @Cdswjp 2 года назад

    great video

  • @ZartabCheema
    @ZartabCheema 3 года назад

    Appreciated, really good topic in a very good way

    • @iCode_Happy_Coding
      @iCode_Happy_Coding  3 года назад

      Thanks Zartab, I’m glad that you found the video useful 🙂

  • @pogosanesyan9999
    @pogosanesyan9999 2 года назад

    How do I give you 10 likes?

  • @fazlinnouzil3946
    @fazlinnouzil3946 3 года назад

    What is dynamic typing? I couldn’t answer this in the interview.

    • @iCode_Happy_Coding
      @iCode_Happy_Coding  3 года назад

      I’m not sure that I got you right, but if you are referring to Dynamic Type, that’s a feature that lets your app’s font size increases or decreases dynamically (depending on user’s preferences). It is helpful for visually challenged people.
      This might be useful
      www.raywenderlich.com/books/auto-layout-by-tutorials/v1.0/chapters/11-dynamic-type

    • @fazlinnouzil3946
      @fazlinnouzil3946 3 года назад

      I think the interviewer asked dynamic typing in objective c runtime. It was the question on objective c.

    • @iCode_Happy_Coding
      @iCode_Happy_Coding  3 года назад +1

      Ok, related to objc runtime. So a variable is dynamically typed when the type of the object it points to is not checked at compile time. Objective-C uses the id data type to represent a variable that is an object without specifying what sort of object it is. This is generally referred as dynamic typing. I'll try to discuss this in detail in one of the video (whichever will be relevant).

    • @fazlinnouzil3946
      @fazlinnouzil3946 3 года назад +1

      @@iCode_Happy_Coding sure, thank you. Objective-c runtime related questions are most welcome. Such questions or contents can hardly find.

  • @abhinavmandloi
    @abhinavmandloi 3 года назад

    Awesome explanation

  • @arjun.shukla
    @arjun.shukla 3 года назад

    Great one!

  • @vivekgupta8827
    @vivekgupta8827 3 года назад

    Good points