Tuesday, May 29, 2012

Where Language Stops and API Starts

Java keywords highlightedOracle vs Google trial is finished and everybody, except Oracle, felt relief as it finished in Google's favour. But there is one thing that struck me during the trial: different treatment of language and APIs. While language is considered mostly un-copyrightable, it is open question can you copyright an API.

I'm confused by this distinction. I always saw it as design decision of programming language creator. Let me show you how it looked like when I started programming. On most personal computers, you had two languages at your disposal: BASIC and assembler. Assembler is somewhat similar to modern languages: you have set of very basic commands (language) and you can call operating system functions (API). BASIC is a different story: there is almost no API. Everything is a part of programming language. Although one may argue that command and functions could be grouped into APIs, there was no such grouping that I recall.

Modern languages like C, C++ or Java took different route: languages has only small number of control commands, and everything else is pushed to libraries exposing APIs. While in BASIC I would get length of string by calling LEN(string), in Java it become string.length(), method of object defined in java.lang API. Now, imagine there is rogue BASIC implementation. While Oracle can sue Google because they infringed API copyright, Original BASIC can't sue BASIC Ripoffers because same functionality is not part of the API, it is part of the language. Hey, maybe that will motivate future language designers to design languages not just to provide best expressiveness and features, but also to be as copyrightable as possible; languages where even mathematical operators are not part of the language, but rather part of an API.

I don't know enough about law to have strong opinion about copyrightability of one or the other, but as a techie, I'm pretty sure that both language and APIs should be treated in the same way.

No comments:

Post a Comment