iPhone PL lockdown

The new iPhone developer agreement as quoted at http://daringfireball.net/2010/04/iphone_agreement_bans_flash_compiler:

3.3.1 — Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs. Applications must be originally written in Objective-C, C, C++, or JavaScript as executed by the iPhone OS WebKit engine, and only code written in C, C++, and Objective-C may compile and directly link against the Documented APIs (e.g., Applications that link to Documented APIs through an intermediary translation or compatibility layer or tool are prohibited).

Now think about this. Basically, they have said "you can only use these PLs to originally write your code, use of any other PLs breaks this agreement." Now, assume iPhone continues to be widely successful and that...eventually PCs are replaced by iPad devices. And say everyone starts copying Apple's locked fortress model, where will PL innovation go?

I'm very disappointed at Apple over this.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Yep

I find it detestable as well. For reasons of PL innovation and plenty of other reasons beside.
Apple's stance continues to worsen at an accelerating pace. I wish I could believe that this will hurt their developer mindshare.

Paul Graham: Apple's Mistake

I wish I could believe that this will hurt their developer mindshare.

Paul Graham has some interesting things to say about Apple's Mistake.

Gilad Bracha's take

Bracha in Closing the Frontier:

Q: How is a programming language interpreter like pornography?

A: They’re both banned at the iPhone App store.

What?!

I haven't noticed this before. This is appalling. While it should be easy enough to circumvent, and Apple will probably not sue/ban you unless you are Adobe, if this is accepted as legitimate behavior (which is unlikely) this might be a watershed moment for the industry.

"Originally Written" ?

Does this preclude writing apps in say an ML -> C++ based language implementation? How in the hell would Apple ever know?

Or if they did "find out," how would this be different than some utility code generators such as lex/yacc or a utility to generate a bunch of boiler plate screen forms? Does Apple really wish to preclude using lex/yacc in iPhone applications???

In addition to being offensive, this seems like a pretty stupid and unenforceable restriction.

Unenforceable in general

Easy to enforce in lots of cases, though. Speculation (in the link above) is that Adobe's soon to be released Flash->iPhone compiler is a primary target.

I guess one (interesting)

I guess one (interesting) way to think about it is to consider compilation that maintains human readability (whatever that amounts to...)

they probably mean the primary language

As written, the clause rules out all use of other languages. But Apple probably means the primary source language, which is much more clear cut.

Modern software development uses little languages all over the place:

- Build languages, such as ant, Maven, or jam

- Expression languages, such as "SUM(A1:A5)" and "find:cell phones -iphone"

- AI decision-making languages, such as "price LT threshold ==> SELL"

- UI-layout languages, such as (pane (label "Okay?") (button "Yes") (button "No"))

This is before getting into tools that aren't strictly source code. Things like bug trackers and configuration management. They all have their own little languages.

I daresay you can't be a productive programmer, by today's standards, without a small army of little languages.

In a fairly strong sense, every program implements a language

I experience the realization not too long ago, that every program we write implements a language. Some are quite simple some are more 'complete', some are graphic, some are 'mouse click' languages, some might even be audio languages. But every user interface amounts to a set of linguistic rules and expressions.

I think this awareness has informed and perhaps improved my own application programming. It is a useful way to look at user interfaces - what sort of language are we forcing a user to learn? How different is it than other languages the user is familiar with? Ideas such as the 'principal of least surprise' fit into this model.

For an obvious example, the C program that implements GHC; for a less obvious example, the program that implements a music player like Amarok. Both have in common a set of expression rules and syntax that they allow.

Semiotics and programming

You might want to review the work of Clarisse de Souza. Her writings on Semiotic Engineering of human-computer interaction share your insight that user interfaces are a form of language.

The semiotic approach (study of signs and communication) explores the relations between the strict program language and the natural language used by the humans creating and using the application. Mismatches between the operations available in the formal code (which supports a limited set of allowed meanings) and the informal users (which can generate unlimited interpretations of the program) are a major source of user errors.

In particular, the author's intent when creating the tool must be somehow transmitted to the user through the application interface. Users will infer their own meanings, and if the intent is not well expressed, those meanings will be faulty.

Bad news for MonoTouch and

Bad news for MonoTouch and Unity, both of which target .NET apps to the iPhone. There are quite a few successful games and apps already written for these platforms too.

This is consistent with

This is consistent with Apple's approach to their locked down devices so not very surprising. Their complaint about Flash as being a performance hog (relative to say, Apple's canvas support in their browser for the same developer base) shows this isn't really a technical issue.

... and not very relevant to LtU?

[[And unless I find a multicore phone worth playing with, I'll stomach it.]]

Extremely relevant to LtU as

Extremely relevant to LtU as "The Programming Languages Weblog." PL diversity is important for us PL researchers you know...

The business angle, and

The business angle, and Apple's feud with Adobe, are not relevant for LtU, of course. PL diversity, as Sean said, is not only relevant for LtU, it underlies what LtU is all about!

One cannot meaningfully

One cannot meaningfully discuss a company's technical decisions without reference to the business angle. The business angle in isolation, of course, would be just be off-topic chatter.

Not really, as I am not

Not really, since I am not concerned with the rationale for the decision, but with its implications.

Long-term implications

Understanding the rationale can help you anticipate the long-term implications. For example, one speculation is that Apple is primarily concerned with abstraction layers which let you create portable apps. If that's correct, then it might be possible to get them to tailor the developer agreement more narrowly, so that any PL you use has to expose all the UI APIs directly, and not offer any of its own.

On the other hand, if Apple's goal is monopoly for its own sake, then they're never going to open up even that much. If you want to discuss the implications, then it'll be useful to know which scenario we're looking at.

Or you might rule that it's too early to talk about it, since none of us know what Apple wants.

Battery

I think the rationale is more simple than that. It's just battery life, since you mostly pay for abstraction in terms of clock cycles.

There are more reasonable

There are more reasonable ways of doing this, which they can already do in their approval process - examine the power usage during a representative use of the app.

No

Adobe has asked Apple to expose certain APIs that would reduce power consumption. Apple has refused, probably on the basis that these APIs are unstable and will not exist in future releases - but also because Apple views their own APIs as all the user should need to use the platform. Things like QuickTime are differentiators.

There are no reasonable ways of achieving power consumption without a better instruction set to target (e.g., the Apple's hardware acceleration API). Jan Ozer, who consults for Adobe, has written about this in the past. This power consumption problem with Flash applies to MAC OS X laptops, too.

Good Point

I guess testing goes far, but formally you run into halting problems and stuff.

It's not a bad decision on their part. They keep APIs and libraries light as not to clutter the OS with all kinds of bits, and -I assume- give reasonable performance with low battery consumption. Can't say I am that against it. What it doesn't take into account is that you can abstract all you want in an application, like embedding LUA. But that still makes sense from Apple's point of view. It just means that maintenance on their part remains low, and people can expect reasonable performance without too many software issues from the device they bought.

I find it pretty fair, albeit that it hints that there should be better ways of doing so.

Apples allows JavaScript.

Apples allows JavaScript. This negates any argument about the performance. Also note that things like GWT seems to be banned as well.

There are actually two

There are actually two somethings potentially relevant that have been bugging me about their policy.

First, Apple is attempting a quality control move based on language difficulty: their high-level languages (those in the browser) have horrendous performance, making them suitable pretty much only for static content, so their policy limits interactive applications to their low-level languages. This, in turn, turns away much of the developer community. Those already invested in the platform benefit from this (and I generally perceive an undertone of this when they discuss non-inherent issues like consistency). So: are there software quality benefits from *enforcing* usability barriers? Forcing the use of Objective-C by those unaccustomed to it would make me think not. However, obviously taking a bit of a jab, maybe Haskell code is beautiful because the audience has been screened.

Second, the sociolinguistic implications of this move are fascinating, which I previously brought up.

It's nonsensical, really

Nebulous concept, unenforceable, invalidates the contracts of all existing app creators (XCode generates starter code too, which nobody "wrote"), prevents porting and code reuse in its strict interpretation ... and the original language in which all programs are written is the language of neuronal firings, ignoring which the language of a specification document is the "originally written" language.

In other words, it invalidates software development as we know it.

Legal contracts are not computer programs

It's nebulous and overly broad precisely so that it can be selectively enforceable. Legal documents are not programs which Apple's lawyers are obligated to blindly execute. A better reading of something like this is "you're probably doing something wrong, but as long as you stay on our good side and don't flagrantly violate the agreement, we won't say anything".

Which isn't all that unusual. If even a tenth of what's written in contracts, licenses, and laws was actually enforced fully, literally, and universally, society would probably collapse. This often seems bizarre to many programmers, being the precise opposite of a computer's tendency to do only, exactly, and all of what you tell it to.

Strained justification of LtU relevance for this comment: Legalese is a terrible programming language, I wonder if it could be improved?

Legalese is a terrible programming language

Legalese is a terrible programming language, I wonder if it could be improved?

Nick Szabo and Mark Miller seem to think so, among others.

Can't imagine this affecting PL research

The general purpose computer will exist so long as there are general purposes. I might buy an iPad so my mother can go online and see pictures of her granddaughter, but it's hardly going to be a suitable replacement for gamers, musicians, artists, software developers, accountants, architects, retailers, telemarketers, computer engineers, police departments, hospitals, universities, power plants, airports, government agencies, and everyone else who wants something you can't find in the app store.

Don't count on it

The general purpose computer will exist so long as there are general purposes.

Not necessarily. Computers just have to be general enough for almost everybody. If locked-down machines like the iPad become the norm (which has got to be Apple's long-term goal), truly general machines will be pushed into smaller and smaller niches. Eventually, if you want to do PL research, you'll need a machine 10 or 100 times as expensive as what you can get at Best Buy.

MacRuby

Does this mean that MacRuby is out on its ear?

Re: MacRuby

I was surprised by this as well, especially since MacRuby development seems to be headed up inside Apple, and sits on the Objective-C runtime.

sjobs@apple.com

I am writing this on my second MacBook Pro. I believe Steve Jobs must have personally approved the new 3.3.1 and thus changed Apple's paradigm to something more locked down than I anticipated.

It is said that some of what is sent to sjobs@apple.com reaches Steve Jobs. I shall let him know that I dissent.

For me, it is time chart a course from OS X back to Linux because the attitude that wrote 3.3.1 cannot be good for the future of OS X. Apple makes good hardware, but if I am willing to pay for it then I can find good hardware elsewhere.

Doesn't bother me

The iPhone/iPad OS and toolchain are so ingrained in the platform that it seems foolish to consider anything other than any of the fully supported C variants. And this is par for the course with embedded-style systems. If you write a game for the Wii, you use Nintendo's development system. I love using different programming languages, but clearly some sense of reality has to take precedence.

Regardless, you still can embed Lua (or any other interpreted language) in your C code, and write much of your app in it. But you need to keep the iPhone library interfacing in C, and not write a full bridge that's accessible via a custom language.

This was already banned...

Regardless, you still can embed Lua (or any other interpreted language) in your C code, and write much of your app in it. But you need to keep the iPhone library interfacing in C, and not write a full bridge that's accessible via a custom language.

Actually, embedded interpreters, compilers, or virtual machines were already banned on the iPhone, even before the latest rev of the dev license. This new version limits freedom even more, by even prohibiting you from using source-to-source translation.

Re: This was already banned...

Actually, not quite. The ban was on interpreters running "downloaded code", not interpreters in general. I have it on pretty good authority that interpreters that didn't run downloaded code were acceptable.

Now, note the use of past tense; I'm not sure what this new agreement means for the "embedded interpreter" scenario, but I'm guessing it's not good. My only thought is that a number of App Store games must be using some sort of interpretation of scripts, and I doubt they'd be banned given Apple's attempt at courting the casual games sector.

Not anymore

That used to be true. Here is the clause from the original iPhone SDK agreement:

No interpreted code may be downloaded and used in an Application except for code that is interpreted and run by Apple’s Published APIs and built-in interpreter(s).

but more recently (sometime in 2009, I think?) Apple changed the terms. Here is the same clause in the iPhone OS 3.2 SDK agreement, with the relevant change highlighted:

No interpreted code may be downloaded or used in an Application except for code that is interpreted and run by Apple’s Documented APIs and built-in interpreter(s).

In short

If you are finishing up your Masters in Computer Science, have determined that a Ph.D. in Comp Sci. is not for you, but you also dread going into the real world to become a "software engineer" or project manager, then apply to Law School and see if you can get an internship at the Software Freedom Law Center with Dan and the gang! ;-)

...Novell, Appcelerator, Corona, Adobe, etc. will be needing you! ;-)

The iPhone/iPad OS and

The iPhone/iPad OS and toolchain are so ingrained in the platform that it seems foolish to consider anything other than any of the fully supported C variants

Why? MonoTouch provides a .NET platform for running on the iPhone, and Unity started that road by providing a successful .NET game development platform for the iPhone. To my knowledge, these are the most well-supported (maybe only?), memory-safe garbage collected platforms for the iPhone.

Apple's previous terms were much more sensible, as they required only compiled code, not specific languages. This requirement is absurd.

Regardless, you still can embed Lua (or any other interpreted language) in your C code

No you can't. The agreement forbids interpreters.

Yeah, but what is an "interpreter", really?

I think the interesting/unfortunate part of the change is that it will almost necessarily lead to selective enforcement. After all, one of the main things we learn with implementing PLs, compilers, etc, is that, in a concrete sense, all programs are interpreters.

Quite. That was one of the

Quite. That was one of the points I was expecting to see mentioned.

Some other perspectives

http://daringfireball.net/2010/04/why_apple_changed_section_331

http://news.ycombinator.com/item?id=1250946

It seems the main goal is to force developers to develop native iPhone apps and avoid being flooded by flash games.

I don't see it having a huge impact of anyone other than Adobe and Flash developers who will know have to learn Cocoa instead.

I don't see it having a huge

I don't see it having a huge impact of anyone other than Adobe and Flash developers who will know have to learn Cocoa instead.

And, of course, anyone who wants to use a programming language other than C, C++, or ObjC. Imagine if you had been forbidden to use graph algorithms in your research, and you have a sense of the absurdity of this decision from my pov.

Now, of course it's true that's not the reason Apple did it, but I'm not actually obliged to adopt their point of view in preference to my own. (Maybe that will be in the next version of their developer license. :)

A Gambit Scheme perspective.

A Gambit Scheme perspective.

And another perspective.

And another perspective.

Schadenfreude

There will certainly be some Schadenfreude because Apple can disrespect developers and drive their many innovative languages, frameworks and systems irrelevant, at least for their much admired products. Apple acts like an authoritarian project manager who hears "freedom" and expects chaos, uncontrollable growth of hobby horses and added dependencies. Suddenly Apple has to support them and gets locked in by others instead of maintaining their hortus conclusus. They lose their freedom in favour for developers voluntarism. In a world of Open Everything Apple is the revolutionary conservative: an author, a designer, not a wise crowd of hobbyists and proletarians with a random taste.

On the other hand I don't quite understand why Apples behaviour shall suddenly become generic? It never was. Other companies have copied their style and innovations but never pretended to be like the computer couturier Apple. Apple doesn't represent a paradigm shift in software engineering but a perturbation in a promiscuous software landscape where everything is coupled to everything.

Lockdown is common in

Lockdown is common in underpowered devices, but the iPhone represents the (by far) leading smart mobile device and the tipping point for them. When you include Kindles and the iPad, which seem to be the next wave of smart devices, we have the locked down embedded mindset being applied to systems that don't really have the same limitations yet companies are bending over backwards to put them in. When you view it as computing classes (in the sense of Bell's Law) -- mainframe, pc, laptop/netbook, cloud, and mobile, this is quite a shift. I don't think it's maintainable due to competitive pressure, but we'll see.

Actually, on SmartCards it

Actually, on SmartCards it is the JVM, demanded e.g. by Telecom providers who wanted to load their own applets, which opened the system a bit.

I wonder if we would lead the same discussion if Apple prescribed using their API but utilized LLVM more thoroughly for their own purposes instead of sticking to GCC. I remember Thomas Lord wrote something illuminating a while ago about Richard Stallmans own very different locking in intentions regarding the GCC. The bewildering and backward oriented language decision made by Apple might be a remote echo of this and isn't entirely without irony.

New multi-tasking feature supposedly required this

One suggestion not discussed here yet is that Apple imposed this restriction as their implementation for multi-tasking requires some internal knowledge of an application's state to facilitate their implementation of suspending the application's activity. Using a VM or language-to-language translation layer would change the application's pattern of resource usage beyond the usage pattern expected by the iPhone's OS.

It all sounds very woolly to me but is there anything to this? I'm not proposing this was the sole reason! Whatever the cause I'm hugely disappointed; I was hoping to harness the Mozart/Oz team's work to port their runtime to Android and embed it in a couple of iPhone/iPad applications. Going back to pure C/C++/ObjC is not an enticing prospect.

Porting Oz on Android and Apple's devices

Dear Oliver,

I am working with Peter Van Roy's researchers on porting Mozart to Android.
We already manage to run mozart applications on Android but there are performance issues because of the Java GUI.
Mozart is running fine and some improvements should help the GUI to be more responsive.
We would like to port Mozart on iPhone/iPod/iPad but there are some problems that we need to think about before.
Mozart should be released in version 1.4.1 soon and this release will be the starting point for the mobile support.

If you want to collaborate on this work, you can send me an e-mail to Jeremie.Melchior@uclouvain.be

About that "general purpose" computer.

The iphone (and ipad) are a return to the Cooperative-multitasking universe that characterized Apple computers up to the release of OS-X. If a program is badly behaved, it can block all other programs from running. One of the reasons Apple needs the App store is to prevent badly-behaved programs from running in the first place.

Rather than hardening the OS itself against untrusted code, which would take extra hardware, extra battery to power it, extra time to run checkers and verifiers, extra development effort, and extra software infrastructure, the App Store, at least in theory, allows them to prevent untrusted code from running, or even retroactively remove it if it gets out before its bad behavior is discovered. It's an interesting theory, and may turn out to be a workable solution for preventing iphones from becoming part of botnets, running malware very often, sending spam without the owner's knowledge, etc.

So it is reasonable to require everyone to use the documented interfaces and not make calls to the private interfaces that allow programs to be badly behaved. Those are the ground rules apple has to force everybody to follow in order to avoid spending massive effort on securing the devices against untrusted running code.

I think the language lockdown is part of Apple's efforts to prevent development tools and environments not controlled by Apple from proliferating. In the first place it is hard to check a development tool against the ability to create badly behaved programs. Apple is declaring, up front, that it will not attempt to do so.

In the second place, such proliferation would increase the degree, over time, to which it could become practical to own and operate a "hacked" iphone without access to the App Store. This is not such a big deal until you consider that the App Store is both Apple's profit center and primary security tool for this device.

I mean, seriously, if someone produces a kernel-mode compiler for the iphone and ports a competing OS to it, whole, with all APIs and multitasking and familiar applications out the wazoo, then the game is over for apple. They can refuse to license the kernel-mode compiler for distribution through their app store, but if I can install Linux with all its stuff, then I no longer give a crap about not being able to get apps from the app store.

Allowing development tools is a very dangerous game when your profit and security both hinge on "nobody can distribute badly-behaved programs." Not only do you have to verify that something isn't a kernel-mode compiler or otherwise "badly-behaved" program but you have to verify that there's no way to use it to make a kernel-mode compiler or otherwise badly-behaved program ..... and infinite regress.

If people ever have enough stuff to thrive and prosper without the app store and comfortably get by, then apple loses. Every development tool out there is a way for more stuff to get created and a risk that if there is enough stuff, someone will distribute it through other channels.

Trying to argue Apple's

Trying to argue Apple's position on technical grounds seems absurd given that they use Objective-C but..

Even if that's the case, I would trust a language to generate cooperative code better than a random entrepreneur trying to write Objective-C.

In the first place it is hard to check a development tool against the ability to create badly behaved programs. Apple is declaring, up front, that it will not attempt to do so.

Red herring -- Apple can do what they've already been doing, checking programs (which I doubt is a good check to beginwith).

primary security tool for this device

That sounds like a really, really bad idea [[though might be ok in a setting like AppEngine where a high-level and instrumentable language is used]]. However, I also don't think it's true. Security comes in layers, and even how the hw is structured in phones starts to provide some.

Finally, the undocumented API stuff is more of a software engineering mistake. There are many ways to have hidden these APIs from non-Apple applications if they so desired.

Linux can run, if you want it to

I'm not sure what your point is. Linux can already be installed on 'jailbroken' iPhones and probably iPads, and of course an iPhone running Linux is not going to access the App Store. There's very little interest in it because the iPhone/iPad hardware is not cross-subsidized by App Store revenue, although I suppose that strategy could be made to work in the future. Accordingly, Apple ought to care little if you wipe out iPhoneOS from your device and replace it with Linux, whereas they would be quite justified in worrying about jailbroken iPhoneOS devices running bootleg apps.

This is not about PL:s

Adobe, after successfully fending off Microsoft (Silverlight), is now attacking Apple's platform in order to place it's meta-platform on it.

This is what 3.3.1 is made of. Not programming languages - they are just a casualty.

Adobe was denied placing the Flash Runtime in the iPhone OS. They now have new technology that statically link the Flash Runtime to every app. And the interepreter is replaced by subroutine-calls to the Flash Runtime. This solution produces large apps and it drains resources (is very inefficient). Adobe openly admits this is sneaking the Flash Runtime in the backdoor.

And as Adobe is releasing CS5 the coming week Apple had to go out now so Adobe-developers knows the rules before they invest.

You should consider how much problems Adobes previous platforms have caused Apple. When moving to Intel CPU:s it took Adobe over 2 years to move. And Adobe is still running 32-bit apps under the compatibility layer from System-7.

And in the mobile world, especially with Apple now using a private version of the ARM CPU, it is very important for Apple to avoid the type of lock-ins Adobe caused them with OSX.

If Apple control the tools they can quickly move functions to hardware for acceleration or battery-conservation (probably within 3-6 months). With Adobe and others on top we are talking years.

I think we have to accept there is a difference between living in a consumer-device world and a computing-device world.

Personally I have a great deal of respect in Apple's decision to rid itself of the proprietary closed web towards a free open web by fighting Flash. Perhaps they have all the wrong reasons but at least they are doing something - the "free internet" crowd seem to prefer just to sit around talking about it.

[Admin]

As noted above: Only programming language related aspects of this decisions are relevant for LtU. Some speculation is hard to resist, too much of it is tiresome. As usual, long time members in good standing will receive more leeway than newcomers when it comes to judging whether posts are on topic or not. While I understand the issue is a hot-button one for some, I highly recommend people not make fools of themselves.

Dalvik

I don't know anything about smart phone development in general; but two questions I have is:

1. Is it possible to target Dalvik directly, or are you are required to go through Java Bytecode? A bit of searching suggests that yes, Dalvik can be targetted directly, although I haven't found a definitive answer.

2. Does Dalvik have reasonable support for proper tail call implementations, or is it just a register-based JVM knockoff?

At the very least, you can download the Dalvik source code here. Unfortunately, I haven't yet found much in the way of documentation.

clue from S. Jobs (PL relevant!)

Steve Jobs gave out an enigmatic clue as to Apple's thinking and there is some PL relevance here. I'll tell the brief back-story, point out the meat of his reply, and then state the PL significance as I see it.

* Backstory

There is another blog run by Paul Graham (et al.) called "Hacker News". The blog is for "hackers", sure, but particularly for hackers who are or wish to become or wish to be understand what it means to be an entrepreneur. Thus, it is full of readers (and commentators) who watch and/or participate in the "App Store" phenomenon with great interest. For example, even if an Apple App is unlikely to make you rich: (a) it might create users for your larger product; (b) it might win you a chunk of change as an alternative to having to seek out and win angel investor capital.

Consequently, there was a fair amount of outrage about this move by Apple. One reader thought to write to Steve Jobs directly, since it is well known that sane messages to his email address receive replies fairly frequently. I will crudely paraphrase the question that was put to Jobs as "What in the world are you thinking? Aren't you just shooting yourself in the foot?"

Jobs (or his staff) replied tersely, but pointed to a third party blog which he said gave an insightful and non-negative analysis. I'm making this LtU post self-contained but here are the cites:

a) an account of the exchange with Jobs' email address:

http://www.taoeffect.com/blog/2010/04/steve-jobs-response-on-section-3-3-1/

b) the "Hacker News" story about that (this link will expire in a few weeks, unfortunately):

http://news.ycombinator.com/item?id=1255858

c) the blog entry that Jobs described as "insightful and non-negative":

http://daringfireball.net/2010/04/why_apple_changed_section_331

* The "Insightful and Non-Negative" Analysis

For our purposes on LtU, the meat of the analysis that Jobs endorsed is this (my loose paraphrase):

~ given a new platform, like iPhone / iPad, people will often try to use it as a target for a meta-platform. A "meta-platform" is a development environment that let's you "write once and run anywhere". For example, at one time, Tcl/Tk was a kind of meta-platform encompassing unix, Windows, and some other platforms. You could write a complete application, including a GUI, using Tcl/Tk - and run with few or no modifications on very different underlying platforms.

~ meta-platforms discourage development that is exclusively for just one of the underlying platforms. A third-party developer wants the largest potential audience, usually. So they'll write to a successful meta-platform when they can.

~ if enough applications are written to a meta-platform we would say, in business terms, that each target platform loses product differentiation. E.g., there will be no special incentive to buy an iPhone because the most important apps run just as well on every other kind of "smart" phone. The App Store will have no special charms, for all the interesting apps will be available elsewhere, at least for other phones.

~ this would undermine the business model Apple is using for the iPhone (and iPad, and iPod touch). Therefore, Apple chooses to banish anything that looks or smells like a meta-platform or potential meta-platform from the App Store and to contractually forbid the porting of a meta-platform to iPhone (and other products) as part of the developer kit agreements.

In a separate message, Jobs also added that (again, paraphrased):

~ typically, applications developed for Apple products via a meta-platform fail to live up to Apple's high standards of user experience quality. Continuing the analogy: Tcl/Tk may have allowed "native looking" GUI apps on Windows, but these could not quite ever have all the bells and whistles of an application that was written directly to, and embraced, the native Windows APIs. The abstractions that enable a meta-platform also undermine the "UI guidelines" of the underlying platform. (In the case of iPhone, it's not necessarily just UI. For example, it is also mentioned in the materials linked above that flash programs, "compiled" to run on iPhone, are bad citizens for managing battery life at least when using the translator that Adobe has developed.)

* Relevance to Programming Language Theorists, Inventors, etc.

Some short observations and speculative analysis:

~ Programming languages and their environments can compete against proprietary operating systems by abstracting away from them such that the underlying operating system becomes a commodity! Well, that's been conceptually true and known for a very long time but often has not worked out well in practice for at least three reasons: performance loss relative to a native platform; a comparative poverty of features and capabilities relative to a native platform; the incentive created by overwhelmingly popular native platforms to write low-level platform-specific programs. Perhaps those negatives are starting to expire around this time in history - hence Apple's concern.

This raises the questions: should programming language designers more explicitly aim to compete not only with other programming languages, but with traditional operating systems? Should programming language theorists begin to regard OS theory as an important sub-specialty of the field?

~ There is a political matter that should be of grave concern to programming language theorists and developers. Apple illustrates the concern but it is surely not limited to them:

Apple has deployed a system of contracts, technological means (DRM), patents, copyright (and perhaps trademarks, but I'm not sure) all with the aim of legally preventing the use of certain forms of abstraction on the computing systems that comprise a very popular platform.

If the Congress of the US or a state legislature were to pass a law forbidding the use of some forms of abstraction in programming, it would take only as long as it takes to process the paperwork and schedule a brief hearing before the courts issued a preliminary injunction against enforcement of the obviously unconstitutional law (on first amendment freedom of speech grounds, among others).

In the US system, at least, contracts are not by default constrained quite so sharply as the legislatures.

And so there is, really and truly, a slippery slope here: if many economically significant platforms are subjected to measures similar to what Apple is doing, the programming language theorists and many other sorts of software theorists and engineers ought to just pack up and go home: the society will be legally barred from developing more sophisticated approaches to programming.

~ We are entering an age of commodity computing, in which typical users have less and less say over what software can run on their systems. The theoretical significance of "legally banning new abstractions" is of growing, real significance because the day to day computing that people and businesses do is migrating towards (a) centralized computing utilities owned by third parties, leased under contract, and accessed under contract; (b) end-nodes (handheld devices up through "workstations" and "servers") which come with built-in DRM and strong contract terms that limit not only what music files you can play or what movies you can watch, but what software you can run.

As an example of one implication, suppose that other platform vendors and commodity computing providers continue to follow Apple's lead. Academic programming language research and development can and will certainly continue but on what terms, and with what relevance?

If it becomes a de facto Mortal Sin to invent a meta-platform, then what relevance will remain to serious programming language innovation?

This may seem like an exaggeratedly dark question. Surely Apple will just do what it does but they are hardly going to impose these restrictions on computing *in general*. Plenty of major vendors will decline to follow Apple's lead so, what's to worry about?

What *I* worry about is the very strong commercial trend towards fairly thin end-nodes (of which mobile phones are just a clear example) combined with the trend towards "commodity computing" - by which I mean not owning and controlling your own main computers but rather leasing cycles over the net from some firm that operates a number of large-factory-sized compute clusters.

This is no longer the idea of renting a server that we saw in the early days of "dot com". The main difference is the "vertical integration": people rent applications, not computers. Universities consider handing over their campus email to Google. Small businesses look for on-line apps as an alternative to internally managed IT. Firms the like of Youtube, Twitter, and Facebook help to undermine the assumption that our most important communication networks are subject to strong regulation in the public interest. It is becoming an unquestioned habit of upcoming generations of individuals and businesses to, as much as possible, give up control of their own computing needs and perform computing and communications subjecting themselves to relatively unconstrained contractual restrictions.

I fear that we face the very plausible risk of the de facto complete privatization and centralization of computing as a field of research and development, and as a tool for day to day life.

That contractually enforced restrictions against programming languages are in the news today, on a commercially quite significant platform, is an illustration of why I say "plausible risk".

Devastating Analysis

Thomas, you summed this up beautifully. I had wanted to write something similar, but was struggling immensely with the big picture - you nailed it.

Some comments:

This raises the questions: should programming language designers more explicitly aim to compete not only with other programming languages, but with traditional operating systems? Should programming language theorists begin to regard OS theory as an important sub-specialty of the field?

Competing with operating systems requires better support for resources. Languages should start with a TCP/IP networking stack that is more modular than Linux, but equal to its performance that comes from its monolithic structure. Ian Piumarta has started in this direction, Walid Taha has done some interesting stuff with resource-aware programming, and the Austin Compiler Project has done interesting research in transforming a clear protocol specification into efficient executable code.

~ We are entering an age of commodity computing, in which typical users have less and less say over what software can run on their systems. The theoretical significance of "legally banning new abstractions" is of growing, real significance because the day to day computing that people and businesses do is migrating towards (a) centralized computing utilities owned by third parties, leased under contract, and accessed under contract; (b) end-nodes (handheld devices up through "workstations" and "servers") which come with built-in DRM and strong contract terms that limit not only what music files you can play or what movies you can watch, but what software you can run.

This is one of the things the EFF and FSF have been fighting, and losing against. Linus Torvalds and Richard M. Stallman simply delayed the inevitable. More broadly, net neutrality is already a myth - what you access through the iPhone is a reflection of what you access through the App Store. The recent appellate court ruling against the FCC is irrelevant. It's also irrelevant whether Congress decides to pass net neutrality legislation or not. You cannot defeat the market, and the market is controlled by mega-corporations.

The upshot of this is that I think services with contracts based on capabilities will become more widely endorsed, out of necessity.

As an example of one implication, suppose that other platform vendors and commodity computing providers continue to follow Apple's lead. Academic programming language research and development can and will certainly continue but on what terms, and with what relevance?

Researchers will go to China, and Sean McDirmid will teach them mandarin, cantonese, and altanese. Half serious. American cryptography researchers did go to Europe in reaction to DMCA. So did *BSD developers. Researchers go where the laws won't apply to them. Do not underestimate labors of love.

Don't despair too much

The "unwashed masses" (sorry) of computer users have more or less used their magical machines first to type, then create small spread sheets, charts, contact databases, and now to communicate with other people and read lots of Web published stuff.

So what? Today's users gobbling up pre-installed software is no different to me than Word Perfect users circa 1990 who had no concept of DOS directory structures and kept hundreds of docs in one directory that they *only* accessed from within Word Perfect, completely ignorant of the operating system at all.

A potential saving grace (has been in the past) is all the small to medium industry applications. Awkward and ugly stuff, like software to manage a textile printing shop - everything from contact management to Pantone colors to book keeping. Not exciting stuff, but stuff like that is ubiquitous in small business (that's most business) and it still drives lots of hardware, system, software and training sales. Outside the relatively mainstream hype, this (useful) crap kind of makes a big (boring) part of the small computing world go round and round.

Many/most of these folks won't every learn anything like C++ or Objective C or try to stuff their (Pascal and Basic, mostly) apps into a browser using Java Script. Just won't happen. Apple will come around or limit their market strictly to "consumers" - which will cost them serious change.

My current neurologist has the most automated office I've ever seen. Every Dr. and nurse has a pad-type device and all past records are at their finger tips, future appointments are scheduled on the spot, and prescriptions just spit out of a big fancy Xerox printer thingy. I image a whole bunch of companies are making a VERY PRETTY PENNY configuring systems like that for the health care industry.

Etc. blah blah blah. I wouldn't worry. A more open platform simply *WILL* exist sooner rather than later - because there's filthy lucre to be made :-)

As for Apple? I've never really assigned them any special status in my picture of the computer platform world. WHO CARES?

I am not despairing

I've seen what Jecel Assumpcao, Jr. did with Merlin programming language/operating system and building his own laptops using FPGAs and bitblt for graphics, all by himself. I know creating a counter-culture will not be a serious issue (following up on naasking's point about a new Apple counter-culture revolting). However, pragmatically speaking, counter-culture movements have always resulted in consumers being denied access to fun leisurely enjoyments like modern 3d games.

That's unwarrantedly pessimistic

If the market is indeed dominated by large corporations, then it is not a free market but a corrupt one, and it can and, historically, will be beaten. Corruption cannot be destroyed, but particular corruptive tools can be broken, as Thomas Covenant says.

"Dominance" and "empire",

"Dominance" and "empire", those militarist categories, hardly ever apply to markets, although they are very seductive metaphors. Market share must be conquered like territory. On the backside of success, being a "monopolist" has a negative appeal and is almost immoral and calls for resistance. The modern day liberal, worker-consumer still loves warfare, in particular when no one gets hurt.

if many economically

if many economically significant platforms are subjected to measures similar to what Apple is doing, the programming language theorists and many other sorts of software theorists and engineers ought to just pack up and go home: the society will be legally barred from developing more sophisticated approaches to programming.

I'm not particularly concerned. Like Microsoft, only a counter-culture will compel more openness from Apple, or relegate them to a niche where they might be happy. Anti-trust convictions did very little to curb MS, but the open source counter-culture to MS's lock-in is very effectively dismantling its stranglehold.

Fortunately, while Apple got a significant first-mover advantage here, Google preempted Apple's draconian measures and already started the counter-culture with Android and the Dalvik VM. It seems to be going pretty strong so far.

As a first-gen iPhone user, I'm fairly certain I'll be getting an Android phone next, because iPhone development has just lost all the exciting PLT potential in my eyes.

It is becoming an unquestioned habit of upcoming generations of individuals and businesses to, as much as possible, give up control of their own computing needs and perform computing and communications subjecting themselves to relatively unconstrained contractual restrictions.

I'll just note that most "owners" are generally not themselves technically savvy, and thus they had already surrendered control of their computing infrastructure to IT staff. I'm not sure handling staffing is any less of a headache than dealing with a third-party service. I suspect it just shuffles the headaches around a little.

Programming Languages and Operating Systems

This raises the questions: should programming language designers more explicitly aim to compete not only with other programming languages, but with traditional operating systems? Should programming language theorists begin to regard OS theory as an important sub-specialty of the field?

The idea that Operating Systems are Languages is probably pretty uncontroversial and unsurprising. But the converse is also true: Languages are Operating Systems, it's just that most are pretty bad ones.

Of course, none of this is in any way novel. I was still crapping my diapers when Dan Ingalls wrote this in the Design Principles Behind Smalltalk paper:

Operating System
An operating system is a collection of things that don't fit into a language. There shouldn't be one.

Forth

That quote reminds me of Forth, where the language kernel is traditionally used as its own OS. Chuck Moore has the "guts" of his IDE driver posted here.

Meta-platforms make for bad software?

Not all meta-platforms are Tcl/Tk. Tcl/Tk, I will agree, tends to make applications that are quirky and unpolished, and that do not mesh well with the OS. However, what about Java, .NET, and web software?

As a sniff test, anyone who has used an Apple desktop or laptop is invited to consider how much of the software they use was developed specifically for Macs. Personally, I tried the experiment, and it went heavily in favor of the meta-platforms. I started out trying to live the Apple dream and using all of the software that is optimized for Apple. Over time, I grudgingly dropped mail, contacts, and calendar for Google equivalents. I never even tried XCode; as a primarily Java developer I use Eclipse, which is based on Java. I have used a variety of web browsers, but all of the big ones are multi-platform, including Safari. At this point, practically everything I use, except the core OS, is cross-platform.

The case against meta-platforms in general is interesting but does not look especially strong in practice. There is certainly a lot of crummy cross-platform software written. At the same time, the very best software is usually cross-platform!

I don't know why this is, but to speculate: cross-platform software has a larger user base, which through a mysterious step two leads to more resources to further develop the app. There are a variety of ways to fill in step two. Pay-per-copy software has more profit if it's cross-platform, which will partially be redirected back into further development. Open-source software will attract more developers, because it can scratch more people's itches. Popular software has more critics and commentators, which lead to a better pool of ideas existing for the developers to draw from. Popular software causes other software to interface with it, making the original software more valuable with no work from the developers. It's good to be popular, and cross-platform software has more room to be popular.

Scope of meta-platforms

Software Factories and Software Product Lines are fundamentally meta-platforms.

So are 4GL code generators. The essence of these code generators is to generate 3GL code that optimizes for nonfunctional requirements given your functional requirements. This equates to 100% reuse of nonfunctional requirements code across all applications. -- Some software factories and software product lines are basically code generators/compilers in this respect.

If you actually look at the quality of code by many modeling tools these days like Eclipse's modeling framework, especially for managed languages, they are often superior to the quality of code output by developers. Modeling tools can also mask away performance optimization differences across versions of a managed runtime environment. e.g. javac transforming pure string concatentation into StringBuilder calls.

The same logic applies to GWT, and also for that matter mapping OCaml code to C or JavaScript, or even the published uses of Haskell for real-time systems in IEEE journals, through the use of FRP.

Language Myths

One aspect of this that I find troubling, and that seems not to have come up in the discussion so far, is how much this move tends to bolster myths about programming languages. It seems that some will conclude that (a) some languages (as opposed to implementations) are slower and more resource heavy than others, (b) libraries are inherently inefficient, (c) code in C like languages is more amenable to analysis in order to prove good behavior than other languages, (d) even when executables are what is being distributed, clients should impose restrictions on the programming language used, and similar notions. I am being a bit vague here, but I hope the kinds of views and over-generalizations I have in mind are clear. These and other myths have been the target of LtU discussions, and great inroads have been made.

Needless to say, whatever Apple's intentions are the bolstering of such views would be an unfortunate outcome. One reason why discussing their motives critically may be important is that it can show that the technical rationale should not be accepted as representing the actual state of the art in the field.

myths

I've also seen a lot of "all languages are Turing-complete anyway, so what does it matter?" comments ...

A scruple of truth in every myth...

If you bar the mythical sufficiently smart optimzer, and constrain the extent of white box composition, and impose a particular process and IO model from the outside, at least (a) and (b) have a reasonable basis. Both languages definitions and the environment inherently constrain language implementation.

For point (d), consider an intermediate possibility: executables are distributed, but only after static analysis, certification, and compilation by a trusted third party. Would it be reasonable to limit the language in this case? i.e. to Joe-E? Or perhaps a language that supports analysis of memory and CPU and power requirements? or process accounting? I think so.

That said, this isn't an argument capable of justifying the "originally written in" constraint. A high-level language can be an intermediate compilation target.

I am a bit curious as to whether Apple's judgement will lead us to develop "code translation" tools that attempt to preserve style and comments and such to beat the system. The floundering 'language oriented programming' movement might see a little more interest.

Impact on Security

As I noted elsewhere, Apple has effectively banned the use of safe languages. The negative security implications for iPhone/iPad users are significant.

I'm one of the people who reserved an iPad for day one. It's not a perfect device, but it's quite good for my purposes. Because Apple is now demonstrating that they are committed to preserving the vulnerability of this machine, I'm probably going to return it. I'm just grateful that they stuck their foot in it while the return period was still valid.

Thankfully, the forthcoming Android tablets won't suffer from any of this.

Want to get Steve's attention? Go buy an iPad, wait 13 days, and return it citing the security consequences of 3.3.1 as your rationale.

So there's at least one area

So there's at least one area of research that will benefit from all this...

Safe Phones

Ironically, after the Android Native Development Kit, Windows is now the only safe phone OS.

They support JavaScript, so

They support JavaScript, so perhaps you mean "fine-grained security" or "security with reasonable performance." Oddly, at least for multiprincipal systems, I view JS as safer than most mainstream languages.

I seriously refuse to take

I seriously refuse to take seriously someone that call C, C++ and Object-C "not safe".

It's the same line of someone saying that the world should ban airplanes 'cause they can be used for war.

PL Terminology

Here on LtU, we take a lot of PL terminology for granted, such as the concept of a "safe language", which has a particular technical meaning that excludes C, C++, and Objective-C.

If you're new to LtU, I recommend the links under "Getting Started" on the left-hand side to get acquainted with how things are discussed here.

check out this fun thread (seriously)

Apple has a clear out on this issue

Given the big money stakes for the iPhone and now iPad, Apple need only throw a relatively tiny bit of money around to various PL projects in order to create "custom" versions of high level languages for their hardware and software platform. They need only pick to help fund one of: Scheme, ML (Ocaml, SML or Alice ML), Haskell, Scala, a few "pop" scripting languages, notably Python and Ruby, some BASIC dialect (really important for smaller industry applications, actually) and maybe a few more speculative language offerings out there (Clean, Mozart Oz, some Forth like offering - who knows?).

The money involved is way small change, it will yield quality "lock in" bindings to their OS API, mostly satiate the PL/PLT community's needs, and get rid of most of the bad press lickety split (which does Apple NO GOOD with potential application developers).

With a little more time, and without even spreading any additional "bribe money" to the PL tools community, they can then devise some sort of "certification program" for other new languages for the platform.

If they don't want to certify a Flash implementation that abstracts their proprietary API's, then frankly, they don't have to. Same would go for Java's and even Squeak's abstracted GUI/OS API's.

The point is, Apple can satiate (1) developers and (2) the PL language and tool builders who love them without sacrificing their "lock in" goal. A more-or-less happy compromise CAN be achieved if Apple has the will.

S.

My speculation is that they'll be doing this with Ruby

They have a been funding a Ruby implementation called MacRuby. It is still only at version 0.5, and it's not currently intended to work with the iPhone platform, but my guess is it'll wind up there soon after 1.0.

OT: "meta-platform"

Wouldn't a "meta-platform" be a platform that you use to write/create/host other platforms? A cross-platform toolkit is just an ordinary platform.

That pretty much defines a

That pretty much defines a 'systems programming language'. Or any language suitable for developing frameworks.

Meta-platform = commoditization of platform

The idea is to automatically resolve non-functional requirements, such as platform mapping. The idea originated (as far as I'm aware) in code generation tools such as the ones James Martin wrote about in the early '80s (but these were not very sophisticated) [edit: Although I suppose the use of microcode by Xerox to build portable platforms like the Alto is an earlier example]. In Model-Driven Architecture circles, where you have a Platform Independent Model and a Platform Specific Model, there is intended to be a clean separation of these models. The goal is to bury non-functional requirements from the purview of developers and the domain expert.

A meta-platform is not a system's programming language. It is a translation tool. The goal is actually to ignore the system as much as possible. Once you understand the system and its performance model, there is little need to keep writing directly to the system. This facilitates reuse.

edit: recently multimedia outlets like TechCrunch have latched onto meta-platform as a buzzword. Surprisingly, they are using it correctly. For example, Google's meta-platform for social networking subsumes Facebook. It commoditizes Facebook.

It's not that dramatic

I think section 3.3.1 is not that dramatic and could actually lead to more programming language theory out there in the field :-) I have written a couple of iPhone Apps sold through the Appstore, learning Objective-C in the process. Objective-C is not that bad, it definitely is better and more uniform than C++. The biggest pain on the iPhone is the missing garbage collection which leads to an attitude of "who cares, memory is reclaimed anyway when the user shuts down the app". Therefore I am developing my own programming language that generates, among other targets, Objective-C code. Now, is that prohibited by section 3.3.1? In theory, yes, in practice, no way! Because if I keep my Objective-C generator to myself, Apple has no means of enforcing section 3.3.1. I also think that my language will give me a strong competitive edge over other app programmers, because writing Objective-C code is just slow. So what does this mean?
It means that in order to write competitive apps in the future, you need to employ programming language theory in-house. Good prospects!

Somebody on Hacker News

Somebody on Hacker News commented that this reads like satire. I can see how one can come to this conclusion :-)

Steve Jobs' "Sales prevention program"

Back in the NeXT days, some of us involved with the NeXT in one way or another used to talk about Steve Jobs' "Sales Prevention Program" because it was all too common for him to implement policies or do something that would kill a particular sale (in some cases a sale of many machines), or destroy NeXT's prospects in a market.

It was the flip side of his amazing intuitive sense of elegance and form. This sense allowed him to instantly 'know' the right way to do things, most of the time. But because he lived by that intuitive sense, when it came up wrong he had no way to rationalize an alternative. Just as there was no way to express why he was right in the 'right' cases, there was no way to argue with that intuitive sense when it was wrong - and quite often there was no way to know whether he was right or wrong until later.

Did they really mean such a PL lockdown?

I'm asking because I'm not even sure they considered thinking at least twice before writing this down. Either way, now that it is (written down) anyway, I take it as a pretty clumsy move, marketing-wise and vis a vis the global PL community. I mean, your average iPhone addict end user won't really care (if at all) about such a lockdown, but that user won't be either the one capable to bring new ideas in, invest time and efforts to build apps on upon the thingy, will he/she? Even though most enthusiastic programmers aren't afraid to learn new PLs if only for fun, I see there a pretty harsh and likely unsuccessful attempt soon or late, from those iPhone folks "in charge". Well, let's wait and have the market see(?)