Wednesday, June 16, 2010

Copland 2010 Revisited

John Siracusa:

The fate of individual competitors aside, the fact that the most dangerous players are all coming out of the gate with languages and APIs a generation ahead of what Apple offers should be a huge warning sign. And again, this is all happening in the memory-starved, CPU-constrained mobile world. On the desktop, Apple is even farther behind.

This is not to say that Cocoa isn’t a great framework or that Objective-C isn’t very good for what it is. However, I think Siracusa is right that there’s a bit of groupthink and complacence at Apple and in the community. There’s a world out there where properties, blocks, and garbage collection are not shiny new toys.

Objective-C does have garbage collection now, but I still read about showstopping bugs in the GC versions of the frameworks. And, of course, any code that might be shared with an iOS app needs to be written with manual memory management. So, practically speaking, garbage collection cannot be the default choice today.

This all reminds of Jonathan Rentzsch’s recent points that (1) developers in the Apple community are great at focusing on user experience but that there is too little concern for the lower levels, and (2) that Section 3.3.1 limits engineering innovation to what Apple is able and willing to provide.

Update (2010-06-19): Jesper thinks that Apple is working on a new language to surpass Objective-C.

31 Comments RSS · Twitter

Were it not for iOS, I imagine Apple would have continued to innovate OS X's developer tools. I imagine things would have finally hit that magic inflection point where scripter folks like me could have gotten our feet wet.

But with iOS, it's crucial to remember that Apple has done no serious work on any part of OS X in four years now, developer tools included.

For four years, no real leadership, focus, or engineers have been dedicated to doing the things that would make programming easier, with all the benefits that could bring to the platform(s).

Until Apple decides on an overall platform(s) strategy, on the future timeline's of iOS and OS X, what OS will be put on what devices, and what the two OS's should share and/or where/when they should merge, it's going to be awfully hard to justifying a focus on the development of core underpinnings...

Chucky: you mean, like, in 4 years nobody worked on Xcode 4, on LLVM, on LLDB, on WebKit & its JS engine, no additions like Objective-C 2.0 have been made, GCD doesn't exist, etc etc?

I'm not sure we live in the same world.

In addition, I disagree with Siracusa. Apple has proved that with a fantastic combination of hardware and software, nobody cares about the language used to develop application. As long as there is money to make, people will adapt. The language is just a mean, not an end.

IMHO higher level languages are designed to lower the entry barrier in the programming world. Legions of incompetent Visual Basic developers can now make apps in C#. So what ? Isn't there enough crap on the AppStore already, that Apple needs to lower the bar too ?

@Chucky “But with iOS, it's crucial to remember that Apple has done no serious work on any part of OS X in four years now, developer tools included.”

They haven’t done as much as I would have liked, but that’s quite an overstatement.

@Florent “Isn't there enough crap on the AppStore already, that Apple needs to lower the bar too?”

I’m talking about raising the ceiling, making competent developers more productive. Would you like to be shackled to Pascal or C instead of Objective-C? If not, then why would you draw the line at Objective-C? Do none of your Mac or iPhone apps ever crash in a way that would have been impossible in a managed language?

@Florent: "nobody cares about the language used to develop application"

So why is there a 3.3.1 section?

@Michael Tsai You make competent developers more productive by offering them powerful frameworks to work with, a language with a good level of abstraction for today's needs and excellent speed of execution. C# has some advantages on the abstraction front (i.e. simpler ways to work with databases) but Apple started modernizing the language with Obj-C 2.0 and nobody said they wouldn't make an Obj-C 3.0. Besides, having a skilled team working on compilers and debuggers was a wise move that will certainly pay off in the future. If they need or want to move to a higher level language, they have the manpower to do it.

I'm not that worried about the future than Siracusa seems to be.

@bob Please don't take the sentence out of its context. It was not my point to defend Apple on clause 3.3.1. The intent of this clause is clearly to prevent people from going the "easy route" and use a common lowest denominator to develop applications that are similar accross platforms, without giving them access to iOS-only technology. I don't agree with the clause, but I won't quit the platform because of that.

> Legions of incompetent Visual Basic developers can now make apps in C#. So what ?

And I can write code at a higher velocity in C# than in Objective-C, despite there being more syntax in my way. If I wrote twice the code, I wouldn't necessarily be twice as productive because the languages and frameworks just don't translate, but I am more expedient in C# than in Objective-C. Since I generally find that I can do more with less lines of Objective-C, I sure would want to be able to write that code faster, too, and have it have less bugs due to the IDE catching many of them before they happen.

Making sure people need hair on their chest to get something done -- ie locking out "Visual Basic developers" -- is cutting off the nose to spite the face. I have yet to meet the magical productivity improvement that *only* makes life easier to the newbie and not at all for the more experienced developers, but there are plenty of examples of the opposite.

@Florent:
"nobody cares about the language used to develop application"

Users might not, but programmers should. I do, because I care about my time. If I write code in a more modern language, I'm faster, I write less code, there are fewer bugs, and debugging is easier.

@Michael Tsai:
"Would you like to be shackled to Pascal or C instead of Objective-C?"

Don't knock Pascal. I'd rather write code in an object-oriented flavor of Pascal (like Oberon) than in Objective-C. Some Pascal descendants are pretty neat.

It seems to me quite likely that Apple is planning to anoint MacRuby as the officially supported dynamic language for OS X and iOS development.

" There’s a world out there where properties, blocks, and garbage collection are not shiny new toys."

Paying too much heed to what everyone else was doing in the 80s would have saddled NeXT with C++.

@Avi Flax

Oh god I hope not!

Siracusa's rather silly. Copland was needed because the old Mac OS was desperately, innately inadequate (some would say plain broken), not because the old Mac OS software APIs lacked a bit of the most recent language chrome and/or language fads.

I wonder if Apple hasn't decided to concentrate instead on improving the tools used to work with C-based languages (clang, llvm, Xcode, etc.) rather than replace those languages. By improving the tools it may be possible to accomplish many of the same things (eg. safe pointers) that introducing a new language would do.

Clay Bridges

I'm with Avi. I've long thought MacRuby is the successor to ObjC.

Chucky you don't know what you are talking about.

If you keep abstracting away the "hard" parts of programming, then you turn computers into more of a "black box" than they already are.

Consider properties in Objective-C 2.0: Many iPhone developers today have no clue how to write accessors/setters. They don't know what @property is really doing.

When you start abstracting away memory management, pointers, and so on, you're raising the next generation of developers to be less competent than their predecessors. You don't have to look very hard to find MANY stories of CS students going to interviews and failing even the most BASIC coding questions (like swapping the values of two variables in C).

I also believe Apple has some interesting plans for the Ruby language and their MavRuby implementation. It would certainly be a nice replacement for Applescript in OS X and ultimately a dynamic alternative to Obj-C for Mac and iOS development.

And for you MacRuby folks:

I just got done migrating an app from using a Ruby gem to Node.js. It's 82% faster. EIGHTY TWO PERCENT.
MacRuby is the successor to Objective-C in the same way that John Scully is the successor to Steve Jobs.

Florent:

"In addition, I disagree with Siracusa. Apple has proved that with a fantastic combination of hardware and software, nobody cares about the language used to develop application. As long as there is money to make, people will adapt. The language is just a mean, not an end."

I can't speak for all people, but today, right now, I am not developing for Apple's platforms because I don't want to write in C (or even C-with-a-thin-Smalltalk-costume). Over 80% of the apps in Apple's AppStore are free, so I don't think that "there is money to make" is the driving force here. And sure, we programmers adapt: by picking platforms that allow us to write in decent languages.

"IMHO higher level languages are designed to lower the entry barrier in the programming world. Legions of incompetent Visual Basic developers can now make apps in C#. So what ? Isn't there enough crap on the AppStore already, that Apple needs to lower the bar too ?"

No, HLLs are designed to allow programmers to express exactly what they mean. Programmers at Google, ILM, and ITA are using Python, for example, and it's not because they're all too "incompetent" to write C.

You can point to the AppStore and see what's on it, but it's impossible to see what *isn't* there because people like me decided not to write for it because of section 3.3.1.

I'm still unclear what it is about Objective-C that people are wanting to replace. It's very easy to use and is based on straight C, which gives it fast execution and a ton of flexibility. These arguments would make more sense if the language and its APIs were holding developers back, but they're clearly not. It seems like longing for something new just for the sake of newness. C remains the #1 most popular language in the world. It's not difficult to learn, and it's very fast and very powerful.

"Programmers at Google, ILM, and ITA are using Python, for example, and it's not because they're all too "incompetent" to write C."

Programmers at Apple use Ruby, and probably Python, too; either one can interface with the Objective-C frameworks.

OS X developers can use lots of languages.

" It seems like longing for something new just for the sake of newness."

Basically that's all it is. A rather shallow longing for other languages' syntactic sugar.

@Preston The language could be safer, faster, and make programmers more productive. C and Objective-C are not going away, but starting from a non-C foundation would enable all sorts of possibilities for developer tools and at runtime.

@Jon H I don’t think anyone in this discussion is primarily concerned with syntactic sugar, although that also matters. The basic data types in Objective-C are way too verbose.

@JonH

"OS X developers can use lots of languages."

Not for iOS apps they can't.

@Michael Tsai I kind of like the verbosity of Objective-C. The language and the tools aren't without faults. None are. However, as someone new to the language, I find reading unfamiliar Objective-C code than it is with other languages out there.

This heat's getting to me. I meat to write that as "I find reading unfamiliar Objective-C code _easier_ than it is with other languages out there."

@Christian Romney Or for any Mac OS X apps that might want to share code with an iOS app.

@Mike P I agree that the verbosity is usually a plus. However, I think there should be some syntax support for the really common cases. For example, [NSMutableDictionary dictionaryWithObjectsAndKeys:…, nil] is too noisy compared with, say, @{…}.

@Bryan: I'm sure you could say the same thing about the transition from assembler to full programming languages. How many C programmers know how to load a word of memory into a CPU register, or have a clue what's going on behind the scenes with their function calls?

[...] a rumor Apple’s developing a new dev language to succeed Objective-C…DF reports via Michael Tsai one Jesper, who [...]

I don't think it would become a replacement for ObjC, but I think it would be a smart move for Apple to bring the MacRuby project far enough along to make it a first-class alternative language for Apple. It brings on new developers who are adept at, and prefer, using an interpreted language like Ruby, with the flexibility and ease of development that it brings (and you can still drop into ObjC for routines where speed is of primary importance (which isn't that often in many applications).

[...] is that, although Objective-C provides automatic memory management via garbage collection (on Mac OS X, but not iOS), it is not a true managed or safe language like Java, C#, or Python. It’s still possible to [...]

[...] really excited about Swift. It’s along the lines of what I had hoped Apple was working on in secret. Having better support for types is great, although I’m [...]

Leave a Comment