Hacker News new | ask | show | jobs
by bismuthsalt 2083 days ago
Designing an API is a creative act. An API is source code. Witness thousands of languages, all with recognizably different standard libraries, including languages like Go or Dart created by Google themselves. The problem is less with individual examples like "max" vs "maximum" or "write" vs "scribble", but more with thousands of packages, classes and methods, 99% of which have the exact names and structure as the Sun's Java ones. That is blatant theft. Google stole Java code from Sun. Shame on them.

What we need the law to do is to distinguish between copying a piece of code and using a piece of code. Just because I use your code doesn't mean you own my code too. What we need the software industry to understand is that relying on a proprietary library makes it impossible to cheaply switch your code to an alternative implementation without rewriting your own code. Alternatives exist: use software with an open license model, or shim out the proprietary library.

1 comments

> The problem is less with individual examples like "max" vs "maximum" or "write" vs "scribble", but more with thousands of packages, classes and methods, 99% of which have the exact names and structure as the Sun's Java ones. That is blatant theft.

You know, it might be worth asking the engineer who wrote java.lang.Math how he came up with those names. Actually, you don't--he already answered it one of the amici briefs. The answer was that he took it from C.

In other words, taking Oracle's argument at face value means that the example API it is accusing Google of illegally copying is itself an illegal copy of the UNIX copyright, whoever actually owns that now.

Perhaps the Sun engineer did indeed copy from UNIX to some mild degree The line between "inspired from" and "copied from" is a fine line indeed. When does a term stop being proprietary and enter the vernacular of a specific profession or of humanity at large? I lean rather liberal on this question, and I hope the law will too. OTOH, what is blatant theft is for your 'original' work to overlap 99%, in both names and structure, to prior work. Google engaged in blatant theft, there is no doubt about it. We are not even talking about a derived work, we are talking about copying word for word a substantial part of somebody else's work.
Look up the names of the functions in java.lang.Math. They are exactly the names and semantics used in the libm functions. Even down to the presence of the atan2 function which computes tan¯¹(y / x).

(You could also point out that JavaScript literally lifts java.lang.Math and java.util.Date into JS code as well, down to Date.getYear returning the Gregorian year - 1900).

Almost completely irrelevant side note: atan2 is immensely useful because it actually does more than calculate the arctangent. It handles all the corner cases in converting a 2d vector to an angle. There's no chance of division by zero, it gets the answer into the correct quadrant automatically, and so on. Those things add up to an annoying series of if statements if all you have is an arctangent function.
First, this is not a 99% blatant copy. I see things on the java side that are not in the libm side, like addExact, IEEEremainder or nextDown. I see things on the libm side that are not in the java package, like fpclassify, gamma or jN. I see things that have been adapted to match java conventions, like copySign vs copysign. The Jaccard similarity index appears to be pretty far from 1, whereas it is a perfect 1 in the case of Google. The perfect 1, up to keeping the 'java' in 'java.*', makes it a 'blatant theft' in the case of Google.

Second, unclear what the legal status of libm is. It appears to implement a standard, thus is legitimate to ask whether the set of implemented functions and their names are the original contribution of libm authors, or are derived from the standards. Generally, if one wants to implement a standard, one needs to acquire the rights to do so, usually in the form of a reasonable fee.

Third, if there are significant overlapping parts that are the creative work of libm authors, and they can establish a prior art claim, they are entitled to seek fair compensation from Sun / Oracle.

https://docs.oracle.com/javase/8/docs/api/java/lang/Math.htm...

https://sourceware.org/newlib/libm.html

PS. Re: atan2, wikipedia: 'The function atan2(y,x) first appeared in the programming language Fortran (in IBM's implementation FORTRAN-IV in 1961). It was originally intended to return a correct and unambiguous value for the angle θ in converting from cartesian coordinates (x, y) to polar coordinates (r, θ).' Perfect example of a term that arguably migrates into the common technical vocabulary over decades.

>I see things on the libm side that are not in the java package, like fpclassify, gamma or jN.

Which were added in C99, which postdates the initial release of Java.