not a beautiful or unique snowflake (nothings) wrote,
not a beautiful or unique snowflake

no numerical computing on the iphone

The new rules for the iPhone SDK use the odd phrase "originally written in Objective C/C/C++". There are two possible interpretations of "originally written" here; one is they mean "immediately preceding translation to machine code", and the other is "the language in which it was first authored".

The assumption is that the 2nd is meant, and that this kills off plans to support Flash. (If only the first is meant, it's not much of a constraint at all, as it wouldn't be hard to translate to C as an intermediate step.) So I'll run with this assumption.

Unfortunately, this has lots and lots of consequences. The constraint isn't a technological one, it's a legal/licensing one. It doesn't matter than you can bypass it by translating intermediately to C so they have no way of detecting what the original language is; it just matters from a legal standpoint (regardless of detectability) that you started with something other than Objective C, C, or C++.

So what does this mean:

  • You can't use any code that was originally written in FORTRAN and mechanically translated to C. Unfortunately, this means most numerical computing libraries can no longer be used on the iPhone, since most of them stem from old optimized codes written in FORTRAN and ported with f2c.

  • I bet there are libraries lying around that were originally written in Pascal and then translated to C as C's popularity grew. I can't point at any specific ones.

  • If you write something out in pseudocode first, and then translate it to C, are you violating Apple's license requirements? What counts as a "language" and as "originally written"?

  • In general you can't use any code that was originally written in some other language than C and translated to C. What about code that you don't know whether it was written in something else and translated to C? Presumably if it turns out otherwise, you can't use it. How do you know it doesn't contain any f2c code? It seems like this means you are at legal risk if you use any third party libraries, at least until those libraries include an assertion that they were originally written in C/C++.

  • Apple's behavior here is annoying enough that I toy with the idea of going into all my public domain libraries and adding a comment at the top 'This program was automatically translated from Turbo Pascal 5.0'. This statement would be a lie, and of course everybody would still be free to use the code on the iPhone in practice because in fact the code was originally written in C, and nothing in the library's "license" forbids using it on the iPhone, nor does the iPhone SDK license forbid these lying C libraries. But would anyone want to take that risk?

  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.