4 ms·
On software like JDK, my feeling (without thinking too much) is that the API is actually the most valuable part and the one that requires true expertise to craf
by jpalomaki 11y ago
On software like JDK, my feeling (without thinking too much) is that the API is actually the most valuable part and the one that requires true expertise to craft.
- iheartmemcache 11y agoWhen I think of API I think of "here is your interface eBNF" (interface)* = (class)* (class) = (method_stub)* | (ivar)* | (class_var)* |(property}* | {delegate}* | {some_LINQy_constructs}* | {other_stuff_from_NETCLR3.5_onwards}* | ... . "Alright, now implement IEnumerator OnNext(); bool MoveNext(); IDisposible Dispose();"[1] and your data now has the trait/type-class/whatever of IEnumerable! That's all an API is really -- method signatures and code contracts between the requester/requestee. The real gold isn't in that, but in the implementation details of the JVM (and the greybeards who know the -Xxs256 -Xmm10230 blah blah, I suppose.) I.e. Azul ZING(tm) and the lot of insanely high-performance and/or hard-real-time-in-the-QNX-sense is priced at... a lot. In finance we used to use it because operations could be bounded deterministically. There was enough value in that that CTOs cut 7 figure checks to run that specific API implementation rather than use the Sun/Oracle JVM. [1] Yep that's probably gobblydygook. My C# and Java meld together, I always confuse IEnumerable,IEnumerator,IDispose,and all the damn duals smash together in my mind, even worse now with Rx one more tensor rank was added (Time). Gods of the CoreCLR, smite me not. Also I'm not in PL design, forgive my bad BNF.
- vetinari 11y agoWhy do you think so? The java.* API is not even that good (it is very verbose to achieve basic things). The only reason to re-implement it is compatibility with existing, third-party software using that API. If you would come with API, that would be technically better, but doing the same thing, do you think that everyone would rewrite all their libraries, frameworks and apps? No way.
- AnthonyMouse 11y agoThat's the point. The API isn't valuable because of the creative expression (the thing copyright protects), it's valuable because its functionality (the thing copyright doesn't protect) is necessary for compatibility. Oracle apparently bamboozled the Federal Circuit into deciding that something called the "structure, sequence and organization" of the API should be copyrightable. But of course nobody cares about that part -- the order doesn't matter. You can sort the API into alphabetical order and strip out all the comments and it would make no real difference to anybody. But here is Oracle claiming that the copyrightable part is worth billions of dollars.
- cwyers 11y agoIf copying the APIs is only valuable for compatibility, why did Google do it? Android isn't compatible with any Java apps.
- wcummings 11y agoLibraries, though.
- AnthonyMouse 11y agoIt's compatible with many Java libraries and IDEs etc. It isn't compatible with Java apps because the UI framework has to be different on a phone. Porting Java apps thereby requires changing only a minority of things rather than everything. It's like asking why you can write C programs on Windows even though it doesn't provide an X server.
- yandie 11y agoJava Map interface specifies: V get(Object key) I was horrified when I realized you could pass any object to get()
- mcosta 11y agointerface{}