• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Dynamic Languages [was: Re: why Obj-C]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dynamic Languages [was: Re: why Obj-C]


  • Subject: Re: Dynamic Languages [was: Re: why Obj-C]
  • From: Matthew Johnson <email@hidden>
  • Date: Sat, 06 Apr 2002 01:23:20 +1000

> objc_msgSend(someObject, @selector(performClick:), nil);
>
> ... then the Objective-C runtime figures out how to dispatch the message.
> That the above are equivalent should help drive this concept home-- if a
> method invocation is really just a call to a C function that takes the
> pointer to the target object and finds the method implementation on that
> object all means that method dispatch occurs entirely at runtime.

Wow that9s a fantastic explanation! Thank you very much. This explains a
lot. I.e why a program will compile and run and then spits the dummy when
you invoke a method that is not in the class.

Alright now I understand that my next question is what is the inherent
benefit of doing this? I can't see it. In fact I can only see the downside
of doing it that way. I.e it compiles.

One benefit I can see is with shared objects introducing new features to a
executable without the need for recompiles. But I can reproduce this in
straight C.

Matt
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Dynamic Languages [was: Re: why Obj-C]
      • From: Bill Bumgarner <email@hidden>
    • Re: Dynamic Languages [was: Re: why Obj-C]
      • From: Marcel Weiher <email@hidden>
    • Re: Dynamic Languages [was: Re: why Obj-C]
      • From: "Erik M. Buck" <email@hidden>
    • Re: Dynamic Languages [was: Re: why Obj-C]
      • From: Dan Crevier <email@hidden>
    • Re: Dynamic Languages [was: Re: why Obj-C]
      • From: Donald Brown <email@hidden>
References: 
 >Dynamic Languages [was: Re: why Obj-C] (From: Bill Bumgarner <email@hidden>)

  • Prev by Date: Re: Carbon IB items missing in Cocoa
  • Next by Date: WWDC 2001 DVDs
  • Previous by thread: Dynamic Languages [was: Re: why Obj-C]
  • Next by thread: Re: Dynamic Languages [was: Re: why Obj-C]
  • Index(es):
    • Date
    • Thread