4 ms·
How viable nowadays is cross-platform application or server software development in Objective-C compared to the same in C++? GNUstep appears to be the best (on
by networked 13y ago
How viable nowadays is cross-platform application or server software development in Objective-C compared to the same in C++? GNUstep appears to be the best (only) solution for the former; is that so?
Edit: To clarify, I'm asking this as a developer who does most work on Linux. My interest in Obj-C is primarily due to its Smalltalk-like message passing mechanism. Edit 2: clarity.
- aaronbrethorst 13y agoThere's Apportable for Android (http://www.apportable.com http://www.apportable.com), which—I'm guessing—likely uses Cocotron under the hood: http://www.cocotron.org http://www.cocotron.org But, in general, not very. Objective-C compilers certainly exist for Windows and Linux, but aren't worth much without Apple's frameworks.
- conradev 13y agoApportable does use Cocotron, but they also stitch in various other open source libraries that are found in the iOS runtime (libdispatch, CommonCrypto, etc): http://www.apportable.com/open_source http://www.apportable.com/open_source
- aaronbrethorst 13y agointeresting, thanks for the link!
- bitwize 13y agoSpeak for yourself. I do game dev in objc, with my own framework, and find it infinitely more useful than c++ even without the apple toolkits.
- networked 13y agoInteresting. Could you expand a bit on the main advantages of Obj-C over C++ in your use case?
- bitwize 13y agoIt's just easier to work with when you have to do things like iterate over dozens of game objects, each of which may or may not have certain properties or methods. Delegation is also a lot easier. So is FFI in some cases; the runtime exposes C functions for querying and even creating and updating classes. In fact, inside the (relatively tiny) ObjC runtime is a complete, COM-like object model that's less of a pain in the butt to use than COM, which is why ObjC was so central to NeXT's software-componentry plans in the good old days (WebObjects, etc.). Obviously you don't want to have any method calls on code paths that need to be super fast, but I'm not afraid of using straight C for those. It's a 2D engine; and from the profiling I've done, drawing and updating the screen still dominates the CPU time used, and it works fast enough even on many, many years old hardware, so I'm not worried about performance.
- kybernetyk 13y agoI played with GNUStep some time ago and well ... Simple core foundation applications for the command line are no problem but as soon as you get into GUI land with cocoa the differences start to grow. IMHO trying out GNUStep is a nice project for a weekend but forget any serious cross platform development ideas.
- cturner 13y agoI played with it last weekend. Not viable. Even the ubuntu packages don't produce a working dev environment. GNUstep is a major, standing lost opportunity for the free-software world. Imagine if the community had just taken openstep and don't a respectable job of this proven platform, instead of life in the wilderness with gnome/kde/unity/etc. Etoile is cool - I'd recommend they focus on making it easy to get a command-line GNUstep dev environment up, and bypass the fiddly IDE tools altogether.
- yebyen 13y agoJust a note, I would not use "Ubuntu doesn't even have" as an argument that something is not viable, since Ubuntu has its roots in Debian and there is a tendency to have old crap in the stable release. For less popular stuff, even the most current release (trusty) is not likely to be kept up-to-date unless one of the core developers is an Ubuntu user. It's not as bad as Debian (used to be?) and I can't come up with an example off the top of my head of something that I needed that was too old and still is, but the most recent memory was Vim, trying to install YouCompleteMe, they had already come out with Vim 7.4 and the most current release of Ubuntu only had 7.3, with about 600 patches behind current and ~75 patches too few to be supported. (It works now. This is not a bug report. You should file one if this GNUstep interests you, unless it's really an upstream problem.)
- cturner 13y agoAgree re ubuntu not being the last word on things. OP wants a cross-platform dev environment though. If a platform that is primarily for free unix is obviously broken on a major linux distro, it's a bad omen for its multiplatform prospects.
- yebyen 13y agoYeah, or it's a bug that needs to be filed with the relevant authority. There are honestly a lot of major linux distros now. If your cross-platform environment's users are all Gentoo, Fedora, NixOS, Exherbo, Arch Linux, your own homebrew distro, and some OSes with another kernel(s), you may have really achieved cross-platform support without finding Ubuntu support. My favorite cross-platform project supports Ubuntu, but is lacking Fedora support. It was a major stumbling block for me (just one day), but the dependencies are nothing special, you can compile libuv and libgmp, ncurses, openssl, and libsigsegv pretty much anywhere that I care about (Mac, Linux, BSD). The only time it mattered for me is when I've got half an hour to give a presentation and the audience is supposed to compile and install the stuff I'm using, but unexpectedly found to be using Fedora and I don't know what packages to tell them to get.