3 ms·
I don't see the relevance of that. Of course those are NOT the same function. But they would logically belong in the same overall API, where "API" as used in th
by throwawaykf05 12y ago
I don't see the relevance of that. Of course those are NOT the same function. But they would logically belong in the same overall API, where "API" as used in this particular context means an overall logical collection of modules and methods, such as that of a standard library. The more relevant comparison would be between "int tolower(int c);" and "char java.lang.Character.toLowerCase(char c);"
This specific case is not talking about copyrighting "java.io.File(String filename)" or "Character.toLowerCase(char c)" in isolation, but rather the overall collection of the whole API. It's all about covering the "structure, sequence and organization" of the API, and there's not much of that in a single function call.
But your point about linking relates to another point I made elsewhere (https://news.ycombinator.com/item?id=8581069 https://news.ycombinator.com/item?id=8581069): you can compile arbitrary textual code to binary code that links to the same symbol in the function table. That is, "new File(fname)" in Java and "open(fname, 'r')" in Jython can both point to the same symbol ("invokespecial #4" in Java bytecode). This is what I mean by "different API for same functionality". Google argues that they needed "binary compatibility" (by citing the Sega and Sony cases), but you do not need to copy the API wholesale for that! They could very well have defined their own new API (e.g. "android.fs.FileObject android.fs.FileSystem.openReadOnly(String fname);") that compiles down to the same bytecode, but then they wouldn't have been able to leverage the widespread pre-existing Java knowledge in the industry.