Re: Xcode 5 & Obj-C++
Re: Xcode 5 & Obj-C++
On 30 Jan 2014, at 11:53, Rui Pacheco <email@hidden> wrote:
>
> And isn’t all this message passing pretty much the same as calling methods in classes, just like you’d do in Java, C# or C++?
I would say that message sending is very different indeed:
https://developer.apple.com/library/ios/documentation/cocoa/conceptual/ObjCRuntimeGuide/Articles/ocrtHowMessagingWorks.html
An Obj-C can load code dynamically at run time see: NSBundle -load.
This makes it possible for an Obj-C object to modify the messages that it can respond to at run time.
This may sound rather abstract but it is extremely useful for writing extensible applications that load up their functionality from plugin bundles.
You can also load frameworks dynamically in this way - though it is more common to use the dynamic linker.
A lot of Cocoa based languages and Cocoa bridges use this technique to access framework based functionality.
The possible behaviours of a C# or C++ are largely defined at compile time.
The actual behaviour of an Objective-C application will only be revealed at runtime.
Jonathan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden