• 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: Xcode 5 & Obj-C++
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xcode 5 & Obj-C++


  • Subject: Re: Xcode 5 & Obj-C++
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Thu, 30 Jan 2014 13:32:47 +0100

Le 30 janv. 2014 à 12:49, email@hidden a écrit :

>
> On 30 Jan 2014, at 00:42, Jens Alfke <email@hidden> wrote:
>
>>
>> Anyone exposing a C++ API in a dynamic library is nuts, IMHO.
>
> What is it that makes C++ so unsuited to code sharing?

We're not talking about code sharing, we are talking about dynamic library.

It is barely possible to create a stable ABI in C++. This language suffers all possible form of fragile base class problem:
Add a new ivar, all subclasses and stack allocated objects are broken.
Add a new virtual method, you break all virtual subclasses.
And I'm not even mentioning the fact that it is possible to build incompatible code from the same sources, depending the C++ features you enable (RTTI, …)

The problem is limited with STL as most of it is just templates and the STL dylib itself contains very few code.

While trying to expose a stable API and ABI in a dynamic library is possible, it is very complex or require some nasty construct like pimpl (which does not solve the virtual method issues).

>
> Objective-C has great clarity of purpose (send a guy a message) and openness.
> Perhaps this is what makes it a great base for building dynamic systems (which is what UI driven applications generally are).
>
> If I need a computational engine within such a dynamic system (say I want to solve the Cutting Stock Problem) then C++ can supply focussed performance.
>
> 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

-- Jean-Daniel





_______________________________________________

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


  • Follow-Ups:
    • Re: Xcode 5 & Obj-C++
      • From: Jens Alfke <email@hidden>
References: 
 >Xcode 5 & Obj-C++ (From: Peter Teeson <email@hidden>)
 >Re: Xcode 5 & Obj-C++ (From: Uli Kusterer <email@hidden>)
 >Re: Xcode 5 & Obj-C++ (From: Uli Kusterer <email@hidden>)
 >Re: Xcode 5 & Obj-C++ (From: Eric Wing <email@hidden>)
 >Re: Xcode 5 & Obj-C++ (From: Jens Alfke <email@hidden>)
 >Re: Xcode 5 & Obj-C++ (From: "email@hidden" <email@hidden>)

  • Prev by Date: Re: Xcode 5 & Obj-C++
  • Next by Date: Re: Xcode 5 & Obj-C++
  • Previous by thread: Re: Xcode 5 & Obj-C++
  • Next by thread: Re: Xcode 5 & Obj-C++
  • Index(es):
    • Date
    • Thread