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".
Why people keep saying that? A good-enough version could be achieved purely in the compiler with code generation. Right now, if you're writing a method in your class Foo it's illegal to say new T(), or T.class. So people fix it by adding a field to store the Class object, plus an extra argument to the constructor that inits that field. Then they can use reflection to make instances of T, or whatever.
So, the compiler just has to note that you've used those (previously illegal) incantations, and respond by adding the extra field and constructor parameter. This would not affect unchanged existing classes, only classes you modify to use the incantations. The compiler would also annotate the class so it knows the significance of the extra constructor parameter, and so when you say:
Foo f = new Foo();
The compiler can silently convert this to:
Foo f = new Foo(String.class);
Clearly a user with an old compiler can still do this manually if they want to call your library.
Of course this isn't as good as C# - Foo.class would still be unable to return something that knew about the String type parameter. To fix "deep reflection" would require big changes to the reflection API. But why make the perfect the enemy of the good? Making a moderate, pragmatic change today doesn't stop you from taking the larger step in the future.
native code.
At least, we keep being told that by MS people and blogs and Channel 9.
Native C++ appears to be their future again.
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 know it's now seen as deeply unfashionable but I like Java a lot. Within it's problem domain I still think it is the best language for the job. But before I'd vote for segmented stacks, which are a fine idea, and closures (which honestly I can live without) I just want to see the fixed memory size removed.
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.
See subject.
Fuck systemd. Fuck Redhat. Fuck Soylent, too. Wait, scratch the last one.
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! :-)
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.
The interviewee calls for cheaper threads so there wouldn't be a need to pool threads or avoid blocking I/O.
But the main problem with threads is not that they are expensive to instantiate or multiplex. It is the lure and illusion of linear control flow. Threads are typically written with a simplistic event model with a loop and a few blocking I/O operations. But what if something happens in the middle of an I/O operation that would require attention and a controlled abortion of the pending operation. Java at least has a reasonably thought-out model of Thread.interrupt() and InterruptedException, but unfortunately the scheme is optional and works only on Solaris (also, catching the interrupts makes the code look really ugly).
Threads are needed to take advantage of multiprocessing, but they shouldn't be used to model what are inherently state machines. In other words, your I/O calls should never block. Your blocking DB commit should be broken into a commit request and a listener, with a possibility to cancel the operation. Let state machines be state machines.
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.