Neal Gafter On Java Under Oracle
An anonymous reader writes "Microsoft's Neal Gafter, who was primary designer and implementer of the Java SE 4 and 5 language enhancements and now works for Microsoft on .NET platform languages, discusses the impact of Oracle's acquisition of Sun on Java, makes the case for adding segmented stacks and a meta-object protocol to Java, and offers some insights into how Java and C#/.NET compare."
The first couple of answers meander a bit, but after that the interview picks up and is a pretty good read.
I gather he drank the kool-aid when he went through the door. I'm halfway through the interview and its basically ".NET is better than Java"
The world's burning. Moped Jesus spotted on I50. Details at 11.
( Oracle )
nealgafter
( J a v a )
Pedantry, but there was no Java SE 4. Confusingly it is Java2, version 1.4. Then they went to Java 5, 6, 7, but kept the internal version number as 1.5, 1.6, 1.7, and it's still "Java 2 platform, standard edition".
It's IT. Everything that is "over" (Mainframes, Dumb Terminals) will be the "next big thing" a while later under a different name (Cloud, Web2.0 Clients)
As a Microsoft employee I'm sure he'll give a fair and balanced review with no influence in comparing them. You know, like the Microsoft "Get The Facts" comparison between Windows and Linux.
Anons need not reply. Questions end with a question mark.
The Ruby/Scala/Python/Erlang/Hipster crowd wants closures, and they're the most important thing in the world. Oh and operator overloading. Oh and no checked exceptions. See other languages don't have those things. And we want all languages to be the same. So Java needs those things.
All this engineering mubmo jumbo about segemented stacks is for weenies. Languages Features are the most important part of a language, how it runs isn't important anymore.
Yeah i am still waiting for that. And after scouring through message boards, old blog posts/interviews from java designers of old and looking at other people wanting to do the same thing, the reason that java still does not allow or never intended you to overload operators? Simply because they say so and that's that. That's not a very good way to handle things in my opinion. Is the '+', '-', '*', '/' etc good enough for most people? Sure. Obviously if you just search 'java overload operators' you will clearly see that I think that this is a very basic issue that should be addressed.
I lost ALL interest in developing in the java platform (certainly a painful decision as it was my weapon of choice), I truly belive Oracle will be harmful to java, they will twist everything that's good about the platform for the sake of near-sighted business. They are the new AOL (remember winamp?), they will kill every piece of code in the sun ecosystem that depends on the community to survive. They just dont get it.
At least, we keep being told that by MS people and blogs and Channel 9.
Really? No. Not really.
Java has its place. If I had to do a quick-and-dirty application I'd probably throw it together in Java SE/Swing, provided that it doesn't have to work with the bare metal or do lots of computational heavy lifting. That said, Java was the first real language I learned (I did lots of VB6 back in my teen years, but I don't want to even speak of the coding abominations I built with that) and looking back on my earlier long-term Java projects there's lots I would have done differently. (or used C++ and QT instead, except I didn't know it at the time.)
"It is a denial of justice not to stretch out a helping hand to the fallen; that is the common right of humanity."
See subject.
Fuck systemd. Fuck Redhat. Fuck Soylent, too. Wait, scratch the last one.
I'd be careful with compiler-only changes to Java. Given the proliferation of frameworks that do dynamic magic with the VM, the VM should in many cases be altered. I may remember the exact details of the below slightly wrong, but you get the point.
In Java there are basic types and classes, and there are equivalent basic types and class. There is bool and there is Boolean. People got a little tired of boxing bools in Booleans and unboxing, so Sun added auto-boxing and auto-un-boxing. When writing code, my bool was suddenly equal to your Boolean. Well, perhaps not. So, I am using a third-party library to parse some XML, I am not going to name smooks here. There exists this POJO that contains a getSomething and setSomething that operate on bools. Smooks, on parsing some XML assumes that since they are bool, a Boolean can be created and assignment can happen. No, it can't. You see, a Boolean can have more values than a bool. True. False. Null. You can't assign a null to a bool. Peculiar, and hard to identify, things happen.
Some times you have to change the VM, and some times perhaps you have to be more intelligent. A .NET bool can be true and false, but a .NET bool? (nullable bool) can be null too. Anders did this smarter than the Sun folks.
sorry wrong link from another story: Here is the real link: real gosling link
Pedantry, but there was no Java SE 4. Confusingly it is Java2, version 1.4. Then they went to Java 5, 6, 7, but kept the internal version number as 1.5, 1.6, 1.7, and it's still "Java 2 platform, standard edition".
Yeah, but with respect, while Slashdotters may be pedantic on occasion (and gratuitously so), you can normally argue that there *might* be a point.
Whereas Java's stupidly inconsistent naming and numbering scheme over the years reflects nothing more than a succession of pointless changes made by stuffed shirts in marketing to justify their jobs, cosmetic changes for changes sake that did nothing but confuse things. (*) Actually worrying about the "correct" nomenclature when everyone knows what is meant seems like dignifying the worthless f*****g about of said marketing tossers, so with no offence intended to you personally, you'll excuse us if we don't give a flying fu... er, monkey! (^_^)
(*) In a similar way to how they confused the "Java" branding by slapping it over many things that were barely related if at all, e.g. the "Java" Desktop System. Though to be fair, MS do similar things, or- the other way round- rebrand the same product/technology under multiple names (e.g. their multiple attempts to promote their Microsoft Passport unified sign-in under countless names over the years).
"Slashdot - News and Chat Sites Deviant". (Click "homepage" link above for details).
Oh sure, I couldn't care either - other than the version number has been ridiculously inflated to meaningless proportions! :-)
Anders had many years of reflection (arf) to ponder over too. Additionally, Sun went out of their way to avoid breaking backwards compatibility where possibly. The other organisation not so much.
Disclaimer: I'm experimenting on a Java compiler with reified generics. It seems to be possible to have reified generics on the current JVM, but it's neither pretty nor quite as powerful as in .NET.
You have to mangle type names - just storing type arguments in a variable is not enough to make inheritance work correctly (so you can inherit both from IList and IList interfaces, for example). And if you open the name mangling can of worms then you have a whole lot of problems:
1) When should be parametrized classes instantiated? During compilation (say 'hello' to horrible code bloat) or during class loading (which would require the modified system classloader).
2) How should co- and contravariance be handled? Generate a lot of proxy methods? Ugly.
and so on.
I respectfully disagree. I care.
I've had several nasty experiences with Java, and while I am onboard with the concept and will support java initiatives in the enterprise.. the stunts they have pulled over the years does not help. Not at all.
And yes, if you are 'in the know' then you are FINE. If you are not, or are not technical.. it's really confusing and does not help when presenting technology options to a bunch of PHBs.
So, I'd mod leenks up .. this is a good point to discuss and is very relevant. Consider this: if you can't talk about it, getting technology into the enterprise and deployed can be extremely difficult.
Case in point: After all of these years, I finally have a server with mediawiki.. and PHP. Problem is, it's now 10 years too late. The main issue with getting PHP.. let alone wiki software? Communication, acceptance and funding. I sorted the funding.. but the other issues remain.
Seeing how this topic is on the table.. let's discuss CA's (computer associates) tendency to rename their software every couple of years..
Meanwhile, it's a pity that Java was meant to be write once, deploy everywhere.. but turned out to be a write once ... twice.. three times ..
P.S. I am still annoyed by the 'security warnings' that get thrown due to 'wrong version'. At least there is a good solution: adblock plus does a good job at blocking specific java objects :)
You have a sick, twisted mind. Please subscribe me to your newsletter.
The guy seriously thinks about some hanging-on-by-bleeding-fingernails edge case stuff.
I just don't see it being relevant to any real world situation.
From the part where he says "I work with compilers..." and, you know, just do int i = 1+1+1+1 a few thousand times... and it will blow the stack. Help me understand why anybody cares if that doesn't compile?
Here's the quote (emphasis added):
I work with compilers and it's easy to crash the Java compiler just by writing, you know, int i = 1+1+1+1 and just do that a few thousand times. And the semantic analyzer will be trying to analyze that, or the parser will be trying to parse it and it will just blow the stack.
And what happens is, the process crashes.
You know, there's no good recovery from that. And you can fix it by [saying], "Well, we start over again but I'll just allocate more stack". The problem is, you can't necessarily know ahead of time how much stack to allocate to any given thread.
I am not sure I agree that it is backwards compatibility Sun has been aiming for, it is more like forwards compatibility. Future Java should function on past JVMs. I am not sure that it is in anybody's interest to be that meticulous. Software should be forcefully updated regularly. Best way to do that is to break compatibility. Now, on the other hand, Microsoft in general have spent significant resources on backwards compatibility. More so than most, but with some very public divergences. Hell, you can still run DOS games on a completely different operating system (Win xxxx since Win2K is written from scratch with no DOS/Real Mode legacy).
(an article by the same author as TFA on the subject.)
Segmented stacks is an implementation issue. Java on z/OS has had segmented stacks from the very beginning because it runs on LE (the z/OS Unix layer) and that's what LE does. You still have a problem with thousands of threads though because you have to choose an initial stack segment size. Too big and you still consume loads of memory, too small and there is an overhead associated with crossing the segment boundary (e.g. page fault).
I read this as. .
"Submission: Neal Gafter on Java"
That sounds about right.
These are my friends, See how they glisten. See this one shine, how he smiles in the light.