6 ms·
Obj-C survives b/c it is the only real way to write iPhone and iPad apps, plain and simple (ignoring Appcelerator and PhoneGap for the moment). If people had op
by fingerprinter 15y ago
Obj-C survives b/c it is the only real way to write iPhone and iPad apps, plain and simple (ignoring Appcelerator and PhoneGap for the moment). If people had options, it is likely they would use the alternatives.
Look at Linux. The "official" language will always be C, but there are toolkits for building GTK apps in Python, Vala, Mono and other even more obscure languages. Some pretty big apps have been written in each and people will continue to use those as long as they are viable options. If, however, someone big enough and with enough clout basically said "only native C/GTK apps will be accepted on our platform", you would see people migrate to that toolchain. It is simple economics.
Apple has the clout (imo, unfortunately) to do that and have done it with Obj-C. They basically killed Java, which was an option up until I think 2 years ago. I can see Apple's perspective, supporting two toolkits is expensive and takes time, resource, energy and focus. In their mind, what benefit to they gain from supporting multiple toolkits? Developers? They know they are popular enough that the developers will take up Obj-C when Java was dropped. Sure there will be grumbling and moaning, but Apple DOESN'T CARE ABOUT DEVELOPERS except that they make apps to attract the users.
I'm not saying what Apple did is right or wrong, but it does make sense from a strategic point of view. However, there is practically no merit to Obj-c on it's own. There are more compelling alternatives at nearly every turn, but NOT if you want to play in the iphone and ipad ecosystem.
- cubicle67 15y agoAre you seriously suggesting it would be better for everyone if developers wrote desktop apps for OSX in Java?! Apple didn't kill Java, Sun did. It was Sun who decided Java apps had to look different (in that special, ugly java kind of way), that they required 5+ seconds to start etc. Java could have been good for desktop apps if done right, but it wasn't and as a result there's very few desktop Java applications (and even fewer good ones). Java was also an awkward fit for Cocoa, lacking the dynamic ability required. Java has it's place, and being a language for desktop apps is not it
- fingerprinter 15y agoI think your misremembering. There was a Cocoa Java API that people could use to write native apps. That is what was killed. Pure Java (Aka. Swing) apps on the desktop is a different thing entirely.
- cubicle67 15y agoSorry, I was unclear. I was referring to Java on the desktop for any OS, and the decisions I was talking about relate to Java almost 10 years ago. If Sun had of done things differently in the late 90's, Java may have been a valid desktop language, but by early 00's it was already a moot point, Apple or no Apple Some things were later fixed, but by then it was too late
- glhaynes 15y agoThe thing is, nearly nobody used Cocoa from Java. And when they did, it usually sucked.
- zoul 15y agoWhat would you rather write iOS/Mac applications in if not Objective-C?
- palish 15y agoMe personally? Lua. That language is as simple and as rugged as a cockroach.
- ams6110 15y agohttps://github.com/probablycorey/wax https://github.com/probablycorey/wax
- glenra 15y agoRuby.
- protomyth 15y agoPerformance would be a serious issue.
- deleted 15y ago[deleted]
- stevejohnson 15y agoMacRuby has disproven that assertion pretty well. It benchmarks remarkably close to Obj-C.
- Argorak 15y agoWell, if you know how Cocoa works, this is unsurprising. It makes it really easy to implement only the important stuff on your own and delegate the plumbing to a highly optimized, generic library.
- pnathan 15y agoCommon Lisp. Ruby. C++. Languages that are not Apple-specific.
- ubernostrum 15y agoExcept this article is from 2009, and concerns itself with why Apple would stick with Objective-C in the first place...