by allenbrunson · 15y ago · 0 comments
Given that Apple has a long history of ditching huge swaths of its technology in favor of more modern alternatives, no matter if their userbase screams bloody murder or not, I'm surprised it hasn't happened already. This would be a good project for those billions they've got sitting in the bank.
I think it would be great if they would anoint some successor as their new systems language, then port Cocoa to it. Programmers could use either objective-c or the new systems language for a few years, just as we used to decide between Cocoa and Carbon. Then objective-c could gradually fade into the past.
Then he revisited it 10 months in 2010: http://arstechnica.com/apple/news/2010/06/copland-2010-revis...
And then he talked about it 2 weeks ago in the Hypercritical Podcast: http://5by5.tv/hypercritical/14
Abstract: new language and new API go hand in hand. A memory managed combo trades execution speed for faster program creation. Was already needed 5 years ago. The recent garbage collection additions don't cut it. Microsoft started working on their successor (.net) 10 years ago and now it's starting to look good. Apple gained some leeway when the iPhone happened. With ever improving CPUs on mobile devices, Apple still risks losing ground down the line.
Great podcast episode, I highly recommend it.
(Not to say I wouldn't mind some significant advancements in Apple's preferred runtime, but there's strong evidence that the current runtime is actually quite suitable. If, as you say, .NET is only now starting to look good after a decade's worth of work, perhaps that wasn't the wisest investment on MS's part. Siracusa's been beating this drum for years and, like many of his crusades, I struggle to see how Apple suffers from not following his advice.)
And when considering any alternative, what are the most costly considerations for any developer, including Apple? The size of a code base is a significant factor. The fact that established code already works (new code may add bugs) is a significant factor. The wealth of knowledge already accumulated by programmers is a significant factor. A new language is very unlikely to win a war in those areas, so it would almost have to solve some other problem that is still costing developers a lot because they're using today's languages.
We have all read pg's essays where he extols the virtues of Lisp, compared to other languages. His primary argument, as best as I can tell, is you can write programs with far less code than in other languages. Such an advantage would be a big win for the platform, and we may come to a time when Apple is forced to do it, because everybody else has, and they risk being left behind.
Objective-C is becoming a weird frankenlanguage. It already was, arguably: a thin layer of smalltalk-like OO sitting on top of C. Just recently, Apple added blocks, which are like continuations in other languages. Maybe that's a good thing, but I think it would be a better thing if we went with a language that had those types of concepts from the beginning.
It has been mentioned elsewhere in this thread that Microsoft has already had their platform-two-dot-oh epiphany, which was .Net: managed languages with automatic garbage collection, and so on. If this evolves into a big win for programmers, Apple will be forced to follow suit.
The biggest argument I can think of for Apple not to try a new systems language is that their cash cow right now is the iOS platform. Doing this now would no doubt cause serious memory and CPU pressure on small devices which can't afford it. So knowing Apple, their likely answer to that would be to come out with a new generation of devices that are no longer compatible with objc, which you have to rewrite everything for.
Saving even an hour writing something as a few terse lines means nothing if in 6 months you need days to decipher and debug it. The code has to remain clear somehow. About the only acceptable use of a clever one-liner is when it provably reduces the runtime of the generated machine code by a significant amount...and even then, the hour you saved not writing code had better be spent writing a block of comments to explain your one-liner.
Yes, Objective-C is weird. But put yourself in the seat of a language parser; it's already a very difficult problem to ensure that some languages parse correctly and unambiguously. If you introduce new syntax that is "weird", it's actually safer than doing something that may cause subtle incompatibilities with all the code that's been compiled a certain way for decades. And that code has proven the "weird" language is practical, whereas a brand new language (no matter how perfectly designed it seems to be) may actually have parser corner cases that have not been ironed out yet.
Garbage collection is a benefit in many situations, but Apple has managed to create a very responsive phone where mere milliseconds are just perceptible enough to make a user think "my iPhone feels fast, and this other phone feels slow". Right now, performance matters most, and manual memory management is an edge for Apple. It's important to make programmers happy, but not as important as it is to sell things to users.
Timing is everything. That epiphany has not yet lead to what it promised originally: a consumer OS in managed code, with major applications in C#.
I do not think that will happen soon, either. => Apple will probably be fine with a OS written in C with some added functionality, especially if they manage to build one or more managed environments on top of it. That way, companies can build their in-house stuff in managed languages, while the core stuff remains finely tuned C.
I do not think that is the most beautiful solution, but it may well be the pragmatic approach that wins the race.
Java? C#? not likely. C/C++? well, you can use them already
I think MacRuby is the closest we have atm to something being groomed as a successor to Obj-C. It's got a way to go yet, but it's already at the stage where it's viable for smaller projects and there's a (small) number of MacRuby apps available on the OSX app store.
Another advantage of MacRuby over some other 'scripting languages' is that it can be compiled to an executable via LLVM bytecode (per macrubyc). This will be appealing to anyone who doesn't want to give away his/her source code.
With the success of the platforms on which Obj-C is used, I don't know if a successor will be another language. An update to Obj-C itself might make perfect sense.
http://merbist.com/2011/03/07/hey-apple-please-be-nice-and-s...
In the early days of Mac OS X, many programmers were seduced by it, but they complained loud and long about having to learn this weird new language that had practically no adoption outside Apple. My guess is that Apple decided to give them java to quell the complaining. It wasn't adopted widely, so that was that.
What they should be replacing objective-c with is something that looks more like, say, Python.
The amount of change Apple is willing to make can be hugely exaggerated, especially if they're able to control the respective technology (which they do mostly, one noticeable exception being desktop CPUs and GPUs).
Replacing it with another language would require a large RAM footprint as both older apps and new apps would require a large amount of shared libs to be loaded, for possibly not that much additional benefit.
The big hit would be that, yes, there are gigabytes of objective-c frameworks installed, which would presumably have to be replicated in the new language. But I could see Apple finding a way to sidestep that issue. Maybe the new systems language and objc could both compile down to similar binaries.
Painful or not, it's going to have to happen sooner or later. Objective-c is, in my opinion, the most outdated thing in Apple's technology stack. There will come a time when it is as big an albatross around their neck as Mac OS 9 was, which they waited far too long to replace.