Re: Xcode 5 & Obj-C++

2014-02-06 Thread altotest1
On Jan 30, 2014, at 2:14 PM, Jens Alfke wrote: > And C++ partisans would tell you that many of these things are limitations of the usual C++ runtimes, not the language itself, but I'm not aware of any current runtimes that avoid them. I bet those same partisans would be the first to the barric

Re: Xcode 5 & Obj-C++

2014-01-31 Thread Scott Ribe
On Jan 30, 2014, at 3:56 PM, Greg Parker wrote: > I bet those same partisans would be the first to the barricades to complain > about the performance downsides of any C++ runtime implementation that did > try to improve ABI fragility. Well, I don't know about that. But it would certainly be wo

Re: Xcode 5 & Obj-C++

2014-01-31 Thread Fritz Anderson
On 30 Jan 2014, at 4:14 PM, Jens Alfke wrote: > And C++ partisans would tell you that many of these things are limitations of > the usual C++ runtimes, not the language itself, but I'm not aware of any > current runtimes that avoid them. For reference, see

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Greg Parker
On Jan 30, 2014, at 2:14 PM, Jens Alfke wrote: > And C++ partisans would tell you that many of these things are limitations of > the usual C++ runtimes, not the language itself, but I'm not aware of any > current runtimes that avoid them. I bet those same partisans would be the first to the bar

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Eric Wing
On 1/30/14, Jens Alfke wrote: > > On Jan 30, 2014, at 4:32 AM, Jean-Daniel Dupas > wrote: > >> 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. >

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Jens Alfke
On Jan 30, 2014, at 1:35 PM, Rui Pacheco wrote: > Is this documented somewhere? These are well-known problems but I don't know if there's authoritative documentation. (And C++ partisans would tell you that many of these things are limitations of the usual C++ runtimes, not the language itself

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Scott Ribe
Google Taligent. (Snicker, snicker, snicker...) They actually wrote a good book on the subject, which was very effective at convincing most sane people to JUST NOT EVEN TRY THAT ;-) Anyway, this has *nothing* to do with Cocoa, OS X, iOS or Xcode. It's just C++, and such things are covered to va

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Scott Ribe
On Jan 30, 2014, at 1:38 PM, Peter Teeson wrote: > ...so just wanted to find out what has changed. Support for most of C++11 :-) :-) :-) -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-dev m

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Rui Pacheco
Is this documented somewhere? On 30 Jan 2014, at 22:26, Jens Alfke wrote: > > On Jan 30, 2014, at 4:32 AM, Jean-Daniel Dupas wrote: > >> 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 subc

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Jens Alfke
On Jan 30, 2014, at 4:32 AM, Jean-Daniel Dupas wrote: > 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 a

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Jo Meder
Hi Rui, On 31/01/2014, at 9:23 AM, Rui Pacheco wrote: > How did you factor out the application logic from the UI rendering? If you mean our application logic, it essentially comes down to abstraction. The application is C++ and sits on our application framework, similar to Qt or wxWidgets. The

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Peter Teeson
On 2014-01-30, at 3:23 PM, Rui Pacheco wrote: > How did you factor out the application logic from the UI rendering? > On 30 Jan 2014, at 21:16, Jo Meder wrote: >> Hi, >> >> Language philosophy aside, our application is a largish cross platform (Mac, >> Windows, Linux) application written in C+

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Peter Teeson
On 2014-01-30, at 3:16 PM, Jo Meder wrote: > Hi, > Language philosophy aside, our application is a largish cross platform (Mac, > Windows, Linux) application written in C++. The UI framework uses Cocoa for > the Mac back end, which means we're using Objective-C++ to interface with > Cocoa. I've

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Rui Pacheco
How did you factor out the application logic from the UI rendering? On 30 Jan 2014, at 21:16, Jo Meder wrote: > Hi, > > Language philosophy aside, our application is a largish cross platform (Mac, > Windows, Linux) application written in C++. The UI framework uses Cocoa for > the Mac back end

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Jo Meder
Hi, Language philosophy aside, our application is a largish cross platform (Mac, Windows, Linux) application written in C++. The UI framework uses Cocoa for the Mac back end, which means we're using Objective-C++ to interface with Cocoa. I've recently, at long last, been able to upgrade from Xc

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Uli Kusterer
On 30 Jan 2014, at 15:09, Uli Kusterer wrote: > On 30 Jan 2014, at 01:28, Eric Wing wrote: >> - Often when comparing Obj-C vs. C++, method dispatch is one of the >> main culprits for the performance difference. But don't forget, Obj-C >> is a pure superset of C and you can always use good old C

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Uli Kusterer
On 30 Jan 2014, at 14:35, Peter Teeson wrote: > The recent flood of language philosophy is informative and interesting but > doesn't address the issues I am interested in. > > My case is one of using the C++ std lib for the containers to work with > traversing a special DAG graph. > I've not

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Uli Kusterer
On 30 Jan 2014, at 12:53, Rui Pacheco wrote: > I too don’t get it. > > 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++? No, they're very different. If you're curious, I blogged how C++ dispatches method calls unde

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Uli Kusterer
On 30 Jan 2014, at 12:49, jonat...@mugginsoft.com wrote: > On 30 Jan 2014, at 00:42, Jens Alfke wrote: >> Anyone exposing a C++ API in a dynamic library is nuts, IMHO. > > What is it that makes C++ so unsuited to code sharing? In short, method look-up depends on order of methods (so deleting

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Uli Kusterer
On 30 Jan 2014, at 01:28, Eric Wing wrote: > - Often when comparing Obj-C vs. C++, method dispatch is one of the > main culprits for the performance difference. But don't forget, Obj-C > is a pure superset of C and you can always use good old C to get the > same performance benefits if you don't n

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Peter Teeson
The recent flood of language philosophy is informative and interesting but doesn't address the issues I am interested in. My case is one of using the C++ std lib for the containers to work with traversing a special DAG graph. I've not found any C or Obj-C code that provides those and I see no re

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Jean-Daniel Dupas
Le 30 janv. 2014 à 12:49, jonat...@mugginsoft.com a écrit : > > On 30 Jan 2014, at 00:42, Jens Alfke 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

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Rui Pacheco
When writing code you get the impression that you’re just calling methods. The type system may make the language more malleable, but when writing normal Core Data driven apps, you’re calling methods on objects. And I wonder if some of the things you highlighted couldn’t be done with well define

Re: Xcode 5 & Obj-C++

2014-01-30 Thread jonat...@mugginsoft.com
On 30 Jan 2014, at 11:53, Rui Pacheco 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/co

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Rui Pacheco
I too don’t get it. 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++? On 30 Jan 2014, at 12:49, jonat...@mugginsoft.com wrote: > > On 30 Jan 2014, at 00:42, Jens Alfke wrote: > >> >> Anyone exposing a C++ API in a d

Re: Xcode 5 & Obj-C++

2014-01-30 Thread jonat...@mugginsoft.com
On 30 Jan 2014, at 00:42, Jens Alfke wrote: > > Anyone exposing a C++ API in a dynamic library is nuts, IMHO. What is it that makes C++ so unsuited to code sharing? Objective-C has great clarity of purpose (send a guy a message) and openness. Perhaps this is what makes it a great base for bu

Re: Xcode 5 & Obj-C++

2014-01-29 Thread Scott Ribe
On Jan 29, 2014, at 6:02 PM, Greg Parker wrote: > Lisp probably did it before that. Hell, Lisp machines did it in hardware ;-) -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list

Re: Xcode 5 & Obj-C++

2014-01-29 Thread Graham Cox
On 30 Jan 2014, at 12:02 pm, Jens Alfke wrote: > Wikipedia has let me down: the entry for > is pretty lame FTFY ;) --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the

Re: Xcode 5 & Obj-C++

2014-01-29 Thread Jens Alfke
On Jan 29, 2014, at 4:57 PM, Lee Ann Rucker wrote: > Smalltalk did it first. Actually LISP did it first, if you want to get pedantic… (Wikipedia has let me down: the entry for Tagged Pointer is pretty lame and has no discussion of the history.) —Jens _

Re: Xcode 5 & Obj-C++

2014-01-29 Thread Greg Parker
On Jan 29, 2014, at 4:57 PM, Lee Ann Rucker wrote: > On Jan 29, 2014, at 4:42 PM, Jens Alfke wrote: >> >> * except for a subset of NSNumbers which the runtime cleverly hides inside >> tagged pointers, a C++-like trick > > Smalltalk did it first. Lisp probably did it before that. -- Greg Par

Re: Xcode 5 & Obj-C++

2014-01-29 Thread Lee Ann Rucker
On Jan 29, 2014, at 4:42 PM, Jens Alfke wrote: > > > * except for a subset of NSNumbers which the runtime cleverly hides inside > tagged pointers, a C++-like trick Smalltalk did it first. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Plea

Re: Xcode 5 & Obj-C++

2014-01-29 Thread Jens Alfke
On Jan 29, 2014, at 4:28 PM, Eric Wing wrote: > - Additionally, C++ will typically increase your compile and link times. Oh my yes. The C++ compiler generates huge amounts of symbolic data and nearly chokes the linker. The last big C++ project I worked on (Chrome) took over a minute just to l

Re: Xcode 5 & Obj-C++

2014-01-29 Thread Eric Wing
On 1/29/14, Uli Kusterer wrote: > On 30 Jan 2014, at 00:16, Rui Pacheco wrote: >> To those of you doing Objective-C++ apps, is there a difference in terms >> of performance or memory usage? >> >> I've noticed that TextMate 2, which is done in Objective-C++, consumes >> less memory than the Chocol

Re: Xcode 5 & Obj-C++

2014-01-29 Thread SevenBits
On Jan 29, 2014, at 6:41 PM, Uli Kusterer wrote: > On 30 Jan 2014, at 00:16, Rui Pacheco wrote: >> To those of you doing Objective-C++ apps, is there a difference in terms of >> performance or memory usage? >> >> I’ve noticed that TextMate 2, which is done in Objective-C++, consumes less >> m

Re: Xcode 5 & Obj-C++

2014-01-29 Thread Uli Kusterer
On 30 Jan 2014, at 00:16, Rui Pacheco wrote: > To those of you doing Objective-C++ apps, is there a difference in terms of > performance or memory usage? > > I’ve noticed that TextMate 2, which is done in Objective-C++, consumes less > memory than the Chocolat editor which seems to be done excl

Re: Xcode 5 & Obj-C++

2014-01-29 Thread Jens Alfke
On Jan 29, 2014, at 3:16 PM, Rui Pacheco wrote: > To those of you doing Objective-C++ apps, is there a difference in terms of > performance or memory usage? > I’ve noticed that TextMate 2, which is done in Objective-C++, consumes less > memory than the Chocolat editor which seems to be done ex

Re: Xcode 5 & Obj-C++

2014-01-29 Thread Rui Pacheco
To those of you doing Objective-C++ apps, is there a difference in terms of performance or memory usage? I’ve noticed that TextMate 2, which is done in Objective-C++, consumes less memory than the Chocolat editor which seems to be done exclusively in Cocoa. On 30 Jan 2014, at 00:04, Uli Kustere

Re: Xcode 5 & Obj-C++

2014-01-29 Thread Uli Kusterer
On 29 Jan 2014, at 18:02, Peter Teeson wrote: > All the searching I've done has not turned up anything current about how > things work > these days with Xcode 5 and llvm. There is the 2005 ObjC++.pdf which I have > but Xcode has changed a lot since those days. I talked about ObjC++ on NSBrie

Re: Xcode 5 & Obj-C++

2014-01-29 Thread koko
On Jan 29, 2014, at 1:48 PM, Jens Alfke wrote: > > On Jan 29, 2014, at 9:02 AM, Peter Teeson wrote: > >> I understand that the file extension needs to be .mm to mix Obj-C and C++. >> But other than a command line template, which is for C++, there does not >> seem to be one for ObjC++. All

Re: Xcode 5 & Obj-C++

2014-01-29 Thread Jens Alfke
On Jan 29, 2014, at 9:02 AM, Peter Teeson wrote: > I understand that the file extension needs to be .mm to mix Obj-C and C++. > But other than a command line template, which is for C++, there does not seem > to be one for ObjC++. It's honestly not any different. You're writing Objective-C code

Re: Xcode 5 & Obj-C++

2014-01-29 Thread Scott Ribe
On Jan 29, 2014, at 10:02 AM, Peter Teeson wrote: > But other than a command line template, which is for C++, there does not seem > to be one for ObjC++. Yep. Never has been. > Are there any current docs that my search didn't find and that you can point > me to? > Or advice you can offer to h

Re: Xcode 5 & Obj-C++

2014-01-29 Thread Abdul Sowayan
Peter, On Jan 29, 2014, at 12:02 PM, Peter Teeson mailto:ptee...@icloud.com>> wrote: I have a project in which I want to take advantage of the C++ Standard library (primarily because of the container classes - including the special ones). FWIW the project has to traverse a directed acyclic graph

Xcode 5 & Obj-C++

2014-01-29 Thread Peter Teeson
I have a project in which I want to take advantage of the C++ Standard library (primarily because of the container classes - including the special ones). FWIW the project has to traverse a directed acyclic graph (yes I know about the boost lib). For the rest of the project Obj-C and Cocoa is suf