3 ms·
> "Sadly Objective-C is only available on Apple platforms." Is that true? I'm not an Obj-C programmer, but I swear I remember Objective C being a part of most
by slantyyz 15y ago
> "Sadly Objective-C is only available on Apple platforms."
Is that true? I'm not an Obj-C programmer, but I swear I remember Objective C being a part of most standard Linux distros well before OSX came out.
- mistercow 15y agoIt's not true. There just isn't great library support on other platforms so doing anything nontrivial outside of OS X or iOS is a pain, although there are projects like Cocotron that are trying to do something about that.
- slantyyz 15y agoI thought so. I figured the OP is probably referring to the lack of Cocoa-like frameworks on other OS's but that one sentence just jumped out at me, because some people would probably take it at face value.
- 2muchcoffeeman 15y agoYep, you can compile Obj-C on linux using gcc.
- novalis 15y agoJust to add to this; it looks like Haxe will have objective-C target available soonish.
- chimeracoder 15y agoTechnically not true, but in practical terms, it is, because you can't do anything useful in Objective-C on Linux (like write iOS applications, which is the biggest reason people want to use Objective-C these days[1]) And it's true in the context of this post, because the author is conflating Objective-C and Cocoa throughout the entire post, so he's correct in saying that 'Objective-C [with Cocoa] is only available on Apple platforms'. [1] https://bbs.archlinux.org/viewtopic.php?id=111490 https://bbs.archlinux.org/viewtopic.php?id=111490
- batista 15y ago>And it's true in the context of this post, because the author is conflating Objective-C and Cocoa throughout the entire post He also mentions GnuStep specifically in the post, and says that it's far from ready to use.
- chimeracoder 15y agoWell, as noted by the top comment in this thread, many of the benefits of Objective-C that he's talking about are really attributable to Cocoa, not the Objective-C language itself. My main point is that, even if the quoted statement in the parent post to my original comment was technically false, the idea was essentially true. The biggest reason for using Objective-C at this point is for a type of project that can only be done on Apple's hardware and OS, not on Linux.
- slantyyz 15y ago>>but in practical terms, it is, because you can't do anything useful in Objective-C on Linux (like write iOS applications, which is the biggest reason people want to use Objective-C these days[1]) But let me give you a simple and plausible scenario where running Obj-C on Linux might be worthwhile. Let's for argument's sake, say I'm an indie Windows developer who wants to do iOS development but has heard the most common complaint about Objective-C -- "the weird syntax". Before I run out and blow my wad a Mac, I can set up a Linux VM with Obj-C to just play with the language at an abstract and academic level and see if I can even wrap my head around the language first. If I were to trust the OP's sentence at face value, I wouldn't really know that was possible.
- DHowett 15y agoYou certainly can compile iOS apps, with full access to Objective-C and Cocoa, on Linux. The platform does not make a lick of difference when you bring a cross-compiler into the mix. That is somewhat like saying that OS X being written in Objective-C somehow makes it possible/easier to write iPhone apps (which again, are not at all tied to the runtime or architecture of the host compiler's system).
- stefanu 15y ago... not only ObjectiveC is available for Linux and Windows as gcc's gobjc, but also GNUstep - kind of open-source Cocoa (former OpenStep): http://gnustep.org http://gnustep.org See my comment above for GNUstep github repo.