Re:Why did Objective-C never catch on? (Ask Slashdot, Aug 2000)
by vpdn on Friday March 30, 2012 @07:03AM
(#3775354)
> Objective-C the language has always been extremely portable.
Is there some inherent feature of the language that would make it more portable than others?
Re:Why did Objective-C never catch on? (Ask Slashdot, Aug 2000)
by conradev on Friday March 30, 2012 @07:30AM
(#3775429)
It sits directly atop C, which, for example, is why C++ is very portable.
Re:Why did Objective-C never catch on? (Ask Slashdot, Aug 2000)
by dfox on Friday March 30, 2012 @09:26AM
(#3775800)
There is significant difference between C++ and Objective-C in this matter. Implementations of C++ that emit C are almost always implemented as full compilers that targets C as output language, but Objective-C can be easily implemented as quite simple preprocessor on top of C, that has almost no understanding of C's syntax. (traditional Objective-C, ie. without closures and such features)
When NeXT shared their compiler patches and runtime (after some GPL-prodding), Objective-C became part of gcc and available on pretty much any supported platform, especially after the GNU-runtime delivered a portable messenger ( objc_msg_lookup()() vs. objc_msgSend() ).
That's the language itself, but you also need to consider the frameworks implemented in it.
NeXTSTep itself was, of course, ported to Intel, HP-Precision architecture and SPARC. Compiling for other architectures was as simple as checking a box in Project Builder. Later there were OPENSTEP-compatible implementations on Windows and Solaris.
The grand-daddy of the open-source implementations is, of course, GNUStep, though there are a bunch more that have been around for a while such as libFoundaton and mgstep. My current favorite is Cocotron, it allows cross-compilation for Windows and Linux right out of Xcode.