• 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: Cocoa from C++ (dont want to mix it)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Cocoa from C++ (dont want to mix it)
      • From: Lars Sonchocky-Helldorf <email@hidden>
  • Prev by Date: Re: Rounded selection rectangles in NSTextView (was: NSBezierPath geometry question...)
  • Next by Date: Re: OT : Is the Jaguar user base large enough to still support it?
  • Previous by thread: Re: Simple question about NSTableView grid...
  • Next by thread: Re: Cocoa from C++ (dont want to mix it)
  • Index(es):
    • Date
    • Thread