Re: Cocoa from C++ (dont want to mix it)
Re: Cocoa from C++ (dont want to mix it)
- Subject: Re: Cocoa from C++ (dont want to mix it)
- From: "Lemings, Eric B" <email@hidden>
- Date: Wed, 13 Apr 2005 15:09:24 -0600
- Thread-topic: Re: Cocoa from C++ (dont want to mix it)
On Thu, 10 Mar 2005 06:37:17 -0800, John Stiles wrote:
>
> In C++, the compiler needs to know about the function ahead of time,
or it simply can't compile it.
> In Objective-C, you can just call whatever and the system will either
figure it out and do the right thing at
> runtime, or throw an exception if it can't be done.
> There really isn't a way to meld static and dynamic binding.
And why does C++ does linkage at compile-time? Well there's a very good
reason for it. Let's examine both cases: the case where the call is
linked correctly and the case where the call is linked incorrectly.
If the call is linked correctly, there isn't a problem with either C++
or Objective-C. The C++ implementation however is probably more
efficient since linkage was done at compile-time whereas Objective-C has
run-time overhead associated with making the correct linkage.
Now the case for incorrect linkage. Would you rather have an link error
occur at compile-time while you're developing the application or at
run-time perhaps after your application is in the field or has already
shipped?
Eric.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden