Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Neal Gafter On Java Under Oracle

Unknown Lamer posted about 3 years ago | from the almost-as-good-as-lisp-circa-1990 dept.

Java 130

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.

cancel ×

130 comments

Sorry! There are no comments related to the filter you selected.

Shills (4, Insightful)

MightyMartian (840721) | about 3 years ago | (#37402720)

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"

Re:Shills (1)

Anonymous Coward | about 3 years ago | (#37402830)

Well it doesn't take shilling to know that it is better than java under most circumstances.

Re:Shills (2, Insightful)

John Courtland (585609) | about 3 years ago | (#37402964)

At least he explains why. MS has way more resources than Sun ever could manage. It surprises me that Java even got out the door, honestly. Also recall that MS hired the best and brightest away from Borland a few years before the inception of .NET. And look, the best of them (Anders) architects C# now.

Re:Shills (3, Insightful)

buchner.johannes (1139593) | about 3 years ago | (#37403364)

At least he explains why. MS has way more resources than Sun ever could manage. It surprises me that Java even got out the door, honestly.

Also recall that MS hired the best and brightest away from Borland a few years before the inception of .NET. And look, the best of them (Anders) architects C# now.

It might also have something to do that when C# turned up, Java was already a mature language and approached the various problems. Of course, if you do something later, you learn from previous attempts, so it couldn't be worse just from that fact. Since C# never aimed to run on non-windows, it's also not a fair comparison of designs, because the goals were different.

Re:Shills (2)

nmb3000 (741169) | about 3 years ago | (#37403722)

Since C# never aimed to run on non-windows, it's also not a fair comparison of designs, because the goals were different.

Plain wrong. C# is a platform-agnostic language with a standards-defined specification [ecma-international.org] . The CLR and CIL specifications are also 100% platform independent.

What is tied to Windows is Microsoft's implementation of their CLR and CIL compiler. This is what Mono implements for other platforms.

Re:Shills (4, Insightful)

Billly Gates (198444) | about 3 years ago | (#37404194)

The MSIL output is loaded with calls to win32 and COM/DCOM. .NET was designed for Java initially. When talks with Sun failed C# was made to run only on Windows and use the .NET API instead.

In essence it was made to quickly be a defacto .NET language tied with Visual Studio. Sure you can use Mono C# but what is the point of not using .NET? The reason why C# apps can't be recompiled on Linux are simply winforms by their very nature are abstraction layers of Com/DCOM. Add then threading and networking and it probably has more ties to things like NDIS and VMS/NT style threads and other nasties. You have to emulate Windows to get anything done.

Sure the spec is free and I think Moto (can't remember exact name) was made for FreeBSD that was an acutal C# compiler but it did not create MSIL or use .NET.

If free software advocates are serious they need to invent an alternative to .NET and some tools to make it competive before Mono can be taken seriously as a cross platform tool. Reinventing .NET and Winforms is a losing battle that will make many programmers switch to Windows and stay there for development costs.

Re:Shills (-1)

Anonymous Coward | about 3 years ago | (#37405160)

There's at least partial winforms-to-gtk translation in some of the Mono libs.

Re:Shills (1)

firewrought (36952) | about 3 years ago | (#37404444)

Plain wrong. C# is a platform-agnostic language with a standards-defined specification. The CLR and CIL specifications are also 100% platform independent.

Agreed, but only in a theoretical sense and only if you're talking about the language specifically. Microsoft's .NET efforts were focused on Windows (at least until XNA and compact framework came along). That's reflected in the API and development tools (hello VisualStudio). You've got to think that Sun might have spent more energy on innovation if they hadn't got bogged down in standardization and "platform purity".

Mono does a half-decent keep-up job (unlike several other open source "cloning" efforts), but it's still just a keep-up job. It will always be behind (no WPF planned, for instance). Pragmatically speaking, C# is not a platform-agnostic language suitable for general programming in the same way that, for instance, Java+Eclipse are.

Re:Shills (1)

Anonymous Coward | about 3 years ago | (#37404594)

Not even Microsoft uses WPF. Why should Mono bother implementing something that's not their goal. Most of .NET code is business logic, back end, etc. with boring UI just like Java (up until they introduced Silverlight).

And Mono implements many things that Microsoft .NET does not implement. Language concepts are fully supported, APIs are not. Do I care about the Windows API on Linux? No, I care about GTK# bindings, Unix bindings, etc.

Re:Shills (2)

SplashMyBandit (1543257) | about 3 years ago | (#37405632)

Kinda right, kinda wrong (I guess you might not be a developer or might not have been in the enterprise software field when Java and later .NET first emerged, which would explain why you don't understand the considerable limitations of .NET). What actually matters is the millions of lines of code in the libraries. The language and language implementation is meaningless in comparison. Basically the .NET libraries only work on Windows and Mono have essentially declared that some libraries will only ever work on Windows (basically, Mono don't intend on implementing some minor things like, oh, WPF). In this context Java totally beats C#/.NET hands down. Sure, C# has some language nice-ities but they pale in comparison to the fact you can run Java almost everywhere (except the places that have forbidden it due to [IMHO, shitty] business reasons, the XBox and iPad/iPhone].

Re:Shills (3, Insightful)

peppepz (1311345) | about 3 years ago | (#37406920)

The ECMA specification dates back to version 2.0 (in 2006, 5 years ago) and even back then, it didn't cover the whole standard library for C#, which is more important than the language itself. C#'s de facto standard library, .NET, is not standardized and has plenty of links to Windows.

The current version of C# (4.0, from 2010), has no standard defining it, besides its Windows-only implementation.

Re:Shills (2)

Billly Gates (198444) | about 3 years ago | (#37403738)

Sun had lots of capital in the 1990s and made billions in revenue when Java was in development. It was before NT slaughtered them and before the great recession and when Wall Street had faith to invest in Sun. I think Java was very well designed for its time in the early 1990s. Sun's obsession with making sure it had to be run on a VM with no executables killed it. Sun wanted software to run on Solaris more than having it mult-platform in a successful way, as many would write java programs but make sure they only ran on Windows because they didn't want to support anything else.

If java did this it would become a standard and more Mac and Linux software would exist today.

Java became conservative for compatibility and bogged down. C# had an unfair advantage of seeing where Java made mistakes and started fresh. ... or not depending on who you talk to in regards of having MSIL just calls for win32 functions with COM/DCOM.

Re:Shills (1)

lgw (121541) | about 3 years ago | (#37403210)

Java and .Net (that's .Net the runtime library, not ASP.Net or any of the confusing array of other stuff called .Net) have been leap-frogging each other for a while now. C# with .Net 4 was "everything in Java 6, and some better stuff". I hope Java 7 is "everything in .Net 4 and some better stuff", but I haven't studied it yet.

Certainly the competition between these languages has been great for developers using either!

Re:Shills (0)

Anonymous Coward | about 3 years ago | (#37403318)

It's not. In part due to half of Java 7 being delayed until Java 8. Perhaps most importantly, Java still does not have lambdas.

Re:Shills (1)

snemarch (1086057) | about 3 years ago | (#37403332)

Java 7 is, unfortunately, extremely lack-luster. That, combined with whOracle in charge, doesn't bode well IMHO.

If only MS actively supported cross-platform .NET, so we had an alternative to Java...

Re:Shills (1)

Billly Gates (198444) | about 3 years ago | (#37403816)

The sun is setting on Java indeed. (no pun intended)

Java will exist as Cobol exists for many decades on crappy intranet apps for IE 6 and for newer mainframe and as/400 apps. I learned true object oriented programmimg on it after I had issues with C++. Java takes millions of lines of code to get anything done in any moderately complex web apps vs PHP and even ASP.Net.

It is a shame as it hurts Linux, but many companies are willing to drop down $100,000 in licensing fees for IIS, SQL Server, and Windows Server over free Linux and Java because of the productivity gains and pro MS inertia by the MBAs in I.T. departments.

Me I am ready to abandon Java on a website I am creating and I am seriously considering C# or PHP if licensing is too expensive. There is no need to start a new project in Java as it is like starting a new project in cobol. Why?

Re:Shills (0)

Anonymous Coward | about 3 years ago | (#37404188)

Go for scala

Re:Shills (0)

Anonymous Coward | about 3 years ago | (#37404202)

Mono and Apache? With Mono's latest 2.10 release they support almost everything you could think of doing in a web application for anything in .Net 3.5 and a lot of stuff in .Net 4.0

Re:Shills (0)

Anonymous Coward | about 3 years ago | (#37405364)

The sun is setting on Java indeed. (no pun intended)

Java will exist as Cobol exists for many decades on crappy intranet apps for IE 6 and for newer mainframe and as/400 apps. I learned true object oriented programmimg on it after I had issues with C++. Java takes millions of lines of code to get anything done in any moderately complex web apps vs PHP and even ASP.Net.

It is a shame as it hurts Linux, but many companies are willing to drop down $100,000 in licensing fees for IIS, SQL Server, and Windows Server over free Linux and Java because of the productivity gains and pro MS inertia by the MBAs in I.T. departments.

Me I am ready to abandon Java on a website I am creating and I am seriously considering C# or PHP if licensing is too expensive. There is no need to start a new project in Java as it is like starting a new project in cobol. Why?

This is a clueless post.

Re:Shills (0)

Anonymous Coward | about 3 years ago | (#37405026)

"have been leap-frogging each other for a while now"

Not really. .NET 1.0 and 1.1 were always behind Java. .NET 2 caught up with Java, but didn't surpass it. .NET passed Java for the first time around 3.5 or 4. Java 7 has no chance of catching up (with things like lambdas being removed). It remains to be seen if Java 8 can leapfrog it.

Re:Shills (0)

Anonymous Coward | about 3 years ago | (#37403312)

Except that .Net is better than Java, in just about any way you can think of. (And, no, Java 7 doesn't really improve anything.) For example, things that .Net does better than Java include generics, LINQ, better concurrency, lambda expressions, a GUI library that actually works, etc..

Things that Java does better than .Net include... uh... wasting memory and running a sandbox game made out of cubes that routinely crashes with VM errors.

The only reason people use Java these days is either momentum or an irrational hatred of Microsoft. The ironic thing is that latter bit has come back to bite Oracle, as the people that hate Microsoft hate Oracle even more.

Re:Shills (1)

MightyMartian (840721) | about 3 years ago | (#37403694)

Or maybe that that they want portability that isn't reliant on rubbish like Mono.

Re:Shills (0)

Anonymous Coward | about 3 years ago | (#37404112)

You don't get portability with Java anyway, so it's a moot point. And if you're targeting Linux you won't be using Java anyway since Java continues to work best on Windows.

If you need portability, you use something like Python. If you need speed, you use crossplatform C. If you want managed code, you use .Net. If you need a bloated, horrible mess, you use Java.

Re:Shills (1)

Cyberax (705495) | about 3 years ago | (#37405976)

The parent is clueless.

Java works just fine in Linux and Windows. Even for complex GUI apps (try IntelliJ IDEA sometime).

Re:Shills (2)

fbjon (692006) | about 3 years ago | (#37407180)

I do crossplatform stuff on Java every day, literally. And I'm not even making any effort to do so, in fact I have never experienced a situation where the OS made any difference. Which isn't saying that differences don't exist, just that they're tiny. It's also not saying that the software is necessarily cross-JVM compatible (different vendors), but that's hardly surprising.

Re:Shills (0)

Anonymous Coward | about 3 years ago | (#37403520)

I know it is considered heretical to suggest this but... well.. .Net actually (in some ways) IS better than Java. MS is an annoying company and .Net has it's own set of problems, but Java is far from perfect and it falls short in several places where .Net excels...

Re:Shills (1)

lakeland (218447) | about 3 years ago | (#37404226)

Well yeah, but it is. In what way except licencing do you prefer Java?

Re:Shills (1)

MightyMartian (840721) | about 3 years ago | (#37404454)

Better cross-platform compatibility. Mono just plain sucks.

Re:Shills (1)

lakeland (218447) | about 3 years ago | (#37404882)

Yes it does.

I mentally clumped that under licencing because I think Miguel can't attract developers due to fear of MS's control, but you're right - that is a reason to develop in Java.

Re:Shills (1)

devent (1627873) | about 3 years ago | (#37406678)

* Better tooling support (ant, maven, grandle, open source plugins),
* free IDEs (Eclipse, Netbeans, IntelliJ, for C# you only have VS),
* more open source libraries, and more active open source community
* simpler language that doesn't change with each version,
- checked exceptions
- no struct/class
- no op-overloading
* it's cross-platform (I can run my applications on all Windows versions, all Linux distributions, on MacOS and on the BSDs if need to, while developing exclusively on Linux).
* support for multiple languages, that are already very stable and mature
- groovy
- scala
- JRuby
- Jython
- JS
- some more
* no need to install a whole DVD of stuff to start developing
- I'm not sure if that's true, but last time I needed C# and VS to develop a web application I had to download a whole DVD full of stuff and install multiple gigabytes on my computer. Even if I'm going to install the whole LAMPP stack on my laptop, with JEE support, that's no way multiple gigabytes. The whole LAMPP stack is 416MB, plus Tomcat 7MB, plus the JDK it's about 50MB, plus Eclipse EE 210MB. That's just a little over 500MB.

Re:Shills (1)

Billly Gates (198444) | about 3 years ago | (#37406734)

Very good summary.

I would add that .NET has much better multiple language support as Scala and Jython are not mature as Lambda is going to be added in Java 8 officially. Iron Python is python for .NET and I believe more languages too have .NET support. That makes it sweet as anyone with a different language can share code as one executable with .NET. Some people were hoping gnome shell 3 would be .NET based a few years ago on Mono as it would help multiple language support and finally give C# apis so it is not so tied to Microsoft. Too risk and never happened.

Also a plus with C# is less lines of code compared to Java. Half the code to do the same things was an early strength touted by Microsoft. That is one of Java's weaknesses if you ever make a complex website.

Re:Shills (0)

Anonymous Coward | about 3 years ago | (#37407080)

* no need to install a whole DVD of stuff to start developing
- I'm not sure if that's true, but last time I needed C# and VS to develop a web application I had to download a whole DVD full of stuff and install multiple gigabytes on my computer. Even if I'm going to install the whole LAMPP stack on my laptop, with JEE support, that's no way multiple gigabytes. The whole LAMPP stack is 416MB, plus Tomcat 7MB, plus the JDK it's about 50MB, plus Eclipse EE 210MB. That's just a little over 500MB.

Microsoft has made great strides in this area. The Microsoft Web Platform Installer (currently, it's here [microsoft.com] ) lets you download the free versions of their development stack quickly and painlessly.

Yes, it's the reduced "free" versions of their software, and I personally think it would make a lot of sense for Microsoft to release the full versions for free. But the free versions of their stuff aren't unreasonably crippled. SQL Server 2008 R2 Express, for instance, supports only a single physical CPU core and limits your databases to 10GB in size. I don't like restrictions of any sort but that is pretty liberal.

Re:Shills (1)

Toonol (1057698) | about 3 years ago | (#37404386)

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"

.Net was designed after Java, and with Java's mistakes in mind. Java has .Net beat on cross-platform functionality, but that's about it. Personally, C# just seems a cleaner language, and a has a MUCH cleaner API.

Re:Shills (1)

GWBasic (900357) | about 3 years ago | (#37404676)

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"

Java and Lamp's advantages have more to do with deployment simplicity then quality of language. C# is a better language, but there's so much more to a development platform then the language or even the VM. With PHP you can just open the script in any text editor and change it without having to recompile. Java has a much more robust open-source / Linux deployment scenario compared to Mono.

Having used PHP, C#, and Java, I'll gladly state that even though C# / .Net is the best language and VM; Java and Lamp are often a better fit for what people are trying to make.

Re:Shills (1)

Xest (935314) | about 3 years ago | (#37407558)

Why does that require drinking the kool-aid? It's actually the truth nowadays.

Java has stagnated in recent years, not least because of the Oracle takeover of Sun. .NET has kept moving at a better pace, and because of that it has left Java behind in a few areas. It also had the advantage of being built after Java such that it could avoid some of Java's shortcomings in C# - operator overloading, cleaner method of integrating unmanaged code etc.

In the early days Java was certainly still better anyway, but now? I don't think anyone with an objective viewpoint would say it is. Without a doubt Java is still nice, but it's now in a position of playing catch up, rather than leading the way.

On Java, under Oracle (3, Funny)

Anonymous Coward | about 3 years ago | (#37402770)

( Oracle )
nealgafter
( J a v a )

Re:On Java, under Oracle (0)

Anonymous Coward | about 3 years ago | (#37403358)

So Java's really screwed then, aye?

Java 1.4 (1)

leenks (906881) | about 3 years ago | (#37402788)

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".

Technically correct, but not worth dignifying it.. (2)

Dogtanian (588974) | about 3 years ago | (#37404452)

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 [wikipedia.org] . 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).

Re:Technically correct, but not worth dignifying i (1)

leenks (906881) | about 3 years ago | (#37404702)

Oh sure, I couldn't care either - other than the version number has been ridiculously inflated to meaningless proportions! :-)

+1 Informative (1)

Hyperhaplo (575219) | about 3 years ago | (#37406030)

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 :)

"Reified generics require JVM changes" (0)

Anonymous Coward | about 3 years ago | (#37403004)

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.

Re:"Reified generics require JVM changes" (1)

terjeber (856226) | about 3 years ago | (#37403680)

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.

Re:"Reified generics require JVM changes" (1)

leenks (906881) | about 3 years ago | (#37404734)

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.
 

Re:"Reified generics require JVM changes" (1)

terjeber (856226) | about 3 years ago | (#37406854)

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).

Re:"Reified generics require JVM changes" (1)

Cyberax (705495) | about 3 years ago | (#37406024)

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.

Re:"Reified generics require JVM changes" (1)

peppepz (1311345) | about 3 years ago | (#37406958)

Sun wanted generified *and* non-generified code to coexist and interoperate on the same JVM, without requiring two different code bases. Apparently it was important to their customers of the time. That's why they chose type-erased generics, IIRC.

(an article by the same author as TFA on the subject [blogspot.com] .)

But they are giving up on .NET and going back to.. (0)

Anonymous Coward | about 3 years ago | (#37403036)

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.

Re:But they are giving up on .NET and going back t (1)

aix tom (902140) | about 3 years ago | (#37403136)

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)

Re:But they are giving up on .NET and going back t (2)

terjeber (856226) | about 3 years ago | (#37403578)

At least, we keep being told that by MS people and blogs and Channel 9.

Really? No. Not really.

fair and balanced (1)

Gravis Zero (934156) | about 3 years ago | (#37403164)

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.

Re:fair and balanced (1)

snemarch (1086057) | about 3 years ago | (#37403448)

Might want to try actually reading TFA?

Sorry, no Segmented Stacks (1)

exabrial (818005) | about 3 years ago | (#37403180)

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.

Re:Sorry, no Segmented Stacks (1)

gafter (197274) | about 3 years ago | (#37404196)

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, and all this talk about automated memory management (garbage collection) and array bounds checking is for weenies too.

Seriously, safety from stack overflow is a language feature, just like reliable tail recursion.

Re:Sorry, no Segmented Stacks (1)

exabrial (818005) | about 3 years ago | (#37404486)

I think you missed the sarcasm brackets...

Re:Sorry, no Segmented Stacks (1)

sonamchauhan (587356) | about 3 years ago | (#37406748)

I missed them too. They're invisible for HTML rendering.

Still no way for overloading operators?? (1)

Cutting_Crew (708624) | about 3 years ago | (#37403246)

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.

Re:Still no way for overloading operators?? (1)

Anonymous Coward | about 3 years ago | (#37403280)

Sure there is. It's called Scala.

Re:Still no way for overloading operators?? (0)

Anonymous Coward | about 3 years ago | (#37403574)

Yeah, usually by c++ programmings trying to write java code.

If you actually read the language spec, Sun did this for very specific reasons and can be easily found. The fact that you were able to google java overload operators and NOT why they did it that way, shows that you are just bringing up useless points just to drag down Java.

There are actual legit things to harp on Java, operator overloading isn't one of them.

Re:Still no way for overloading operators?? (1)

Cutting_Crew (708624) | about 3 years ago | (#37404002)

please give me the link where they gave a specific reason other than "because that's the way we wanted it". you want to know what i read straight from gosling about this very subject? How about look at this interview with Gosling himself [thehill.com] .

And i quote: "There are some things that I kind of feel torn about, like operator overloading. I left out operator overloading as a fairly personal choice because I had seen too many people abuse it in C++" - In other words no operator overloading because he himself decided not to based on him decided what should and could be considered safe. If you don't want people messing things up there are a lot more things you could remove from the language outside of pointers and operator overloading.

sorry - REAL link with gosling here. (1)

Cutting_Crew (708624) | about 3 years ago | (#37404072)

sorry wrong link from another story: Here is the real link: real gosling link [www.gotw.ca]

Re:sorry - REAL link with gosling here. (0)

Anonymous Coward | about 3 years ago | (#37405136)

Not sure if the GP was talking about this, but Sun did have things like this :
http://java.sun.com/docs/white/langenv/Simple.doc2.html [sun.com]

which pretty much states what they were trying to go for. To be honest, it's pretty close to what Gosling himself stated.

Re:sorry - REAL link with gosling here. (1)

Cutting_Crew (708624) | about 3 years ago | (#37405572)

they worded it differently but Gosling was less mysterious. It is clear that Gosling had a "personal choice" about not including operator overloading based on C++ mechanism that he saw were bad things. His personal choice can easily be converted down to what i said at the top of this thread. No operator overloading allowed 'because i say it isn't good for you and because i say so'. That, as I said before is not the right path to go down. Software developers should learn when to use a part of a language and when not to. Obviously, overloading an operator is not needed in a lot of cases. When you need to finally use it however, developers should learn the pros and cos, use the ability to do what they need, to get things done and not have a roadblock in front of them because one of the designers of the language feels like that he needs to hold your hand going down the pipe.

Re:Still no way for overloading operators?? (1)

Desler (1608317) | about 3 years ago | (#37404006)

Yes a very stupid reason since they overloaded the + operator themselves. Apparently they are the only people who are allowed to do so bring such gurus. Especially since it's just as easy to do the same bad things with regular member functions as can be done with an overloaded operator.

Re:Still no way for overloading operators?? (1)

jedwidz (1399015) | about 3 years ago | (#37406016)

Well sort of - you can '+' two String instances together, but String is really a primitive type that acts like a class.

So in that sense this is no more overloading than is allowing '+' to stand for both integer and floating-point addition.

Re:Still no way for overloading operators?? (0)

Anonymous Coward | about 3 years ago | (#37403576)

That proposal was considered at the inception of Java and the answer was "no" just like pointer arithmatic was considered and the answer was also "no".

There are languages that offer this, you're very welcome to use them, some will compile into JVM bytecode even.

As for me, after seeing the moronic uses of operator overloading I'm happy to not have it, there's plenty of functionally equivalent ways to do the same thing and it avoids one way to make code needlessly complex, unreadable, and hard to maintain.

Re:Still no way for overloading operators?? (0)

Anonymous Coward | about 3 years ago | (#37403830)

Every now and then, I come across some post or argument in favor or against operator overloading, but after 15 years working with Java I don't think there is a mayority of people looking for that feature. I''m not against having operator overloading in Java but I would not hold my breath...

Re:Still no way for overloading operators?? (1)

Billly Gates (198444) | about 3 years ago | (#37403892)

Java was designed to be cleaner than C++ and easier to develop and read. Operator overloading can be abused just like pointers and casting. What Sun did was write down a list of things bad in C++ and make sure they were gone in Java.

You can use pointers and casting in Java, but you need to use the api to do it for you.

Re:Still no way for overloading operators?? (1)

Desler (1608317) | about 3 years ago | (#37404066)

How is operator overloading any worse than creating a member function that does something contrary to what the name says? Eliminating something entirely because someone could do something wrong is idiotic.

Re:Still no way for overloading operators?? (2)

firewrought (36952) | about 3 years ago | (#37404522)

What Sun did was write down a list of things bad in C++ and make sure they were gone in Java.

I feel operator overloading is one of those features that is mis-categorized as being fundamentally bad when in fact it was only temporarily bad. I suspect that a lot of people got giddy when the feature was popularized by C++ and wrote a lot of bad code as a result, but with time and maturity people have learned how to handle this feature sensibly. My evidence? C# supports operator overloading and I've never seen it abused, despite all the other bad C# I've seen.

Operator overloading is like your word processor's font capabilities... when people first discovered that they could have multiple fonts in the same document, you'd see all sorts of crazy font/styling overuse. But nobody in the publishing world does this even more (not even Wired), and even your Aunt has figured out that you don't need to put 5 different typefaces in the same document.

Re:Still no way for overloading operators?? (1)

Desler (1608317) | about 3 years ago | (#37403894)

Java has operator overloading it's just taken away from the programmers. String concatenation with + is done through oppressor overloading. Unfortunately the java designers think no one else should be able to do so to stop them from doing.bad things. But then again these are the same people who develop the jvm which is doing its best to pass flash as being the most exploitable piece of software running on your system so maybe they aren't the best to be.lecturing others on bad practices.

Re:Still no way for overloading operators?? (1)

Late Adopter (1492849) | about 3 years ago | (#37404352)

Operators imply commutivity (a+b = b+a). You can't guarantee that if the function is implemented by a or b. It's a bad idea that leads to subtle errors down the road.

Re:Still no way for overloading operators?? (1)

AuMatar (183847) | about 3 years ago | (#37404480)

No, the + operator implies commutivity. Not all do. Division doesn't. >, >, don't. I agree that you shouldn't use + for string concatenation because it isn't commutitive, but there's no reason other operators can't be overlaoded, or that + couldn't be when the result is commutitive.

Re:Still no way for overloading operators?? (1)

flargleblarg (685368) | about 3 years ago | (#37404630)

I'm a fan of . for string concatenation in Perl. Of course, this wouldn't work in Java or C++. It's too bad C++ doesn't have Perl's x operator. Then x could be overridden for cross-product in vectors.

Re:Still no way for overloading operators?? (1)

Desler (1608317) | about 3 years ago | (#37404698)

So that's why it was bad for the Java developers to overload the + operator for string concatenation, right?

Re:Still no way for overloading operators?? (0)

Anonymous Coward | about 3 years ago | (#37404732)

It's not a bug, it's a feature. One of the primary design principles of Java is that it does what it looks like it does. They wanted to avoid the hidden method calls that C++ has. Of course, as a sibling pointed out, you can use Scala if you value language features over readability.

Re:Still no way for overloading operators?? (1)

Bob9113 (14996) | about 3 years ago | (#37404912)

the reason that java still does not allow or never intended you to overload operators? Simply because they say so and that's that.

The reason Java does not allow operator overloading is to make it harder for rookies to shoot themselves or others in the foot. Same as Java's typing; duck-typing is more powerful, but more subject to pebkac errors.

Re:Still no way for overloading operators?? (1)

Cutting_Crew (708624) | about 3 years ago | (#37405604)

but there are a lot of things besides operator overloading that can shoot you in the foot. Do we scale down the language to the point of developers not having to debug their errors or perhaps no mechanism for a program to even crash? If you are a rookie there is no way to put a value as a noob to a language making mistakes, debugging your code, stepping through it, finding the errors and learning from your wicked ways.

Re:Still no way for overloading operators?? (1)

jedwidz (1399015) | about 3 years ago | (#37406188)

Compare to Smalltalk - once you decide that everything is an object, you pretty much have to either support operator overloading, or not support operators at all.

Java on the other hand has both primitive and object types, each with a distinct set of operators. That is, aside from the awkward case of '+' for string concatenation, and the effects of auto-[un]boxing, and maybe some other bits and bobs I've forgotten about.

But note that the operators provided for primitives are all 'numbers'-related, since the primitive types are numeric. Apart from classes that represent numbers, re-using that same set of operators doesn't make much sense. And in that space there's scope for operator overloading for classes like BigInteger, BigDecimal, a Complex, maybe a Quarternion, and frankly that's about it.

I'd actually prefer that handful of classes to gain operators by making them primitives (like String), rather than allowing those operators to be overloaded for arbitrary classes.

Some languages, like Smalltalk and Haskell, allow new operators to be defined, rather than being restricted to the predefined set as in C++. On the face of it that's a great feature, until you account for operator fixity, which is where it gets really nasty. In Smalltalk, '5 + 4 * 2' mightn't mean what you think it does (it's 18, like on a cheapo desk calculator), and in Haskell 'a =*= [] &&- 4 --+ d' could be a mission to decipher.

Most interesting (0)

Anonymous Coward | about 3 years ago | (#37403282)

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.

Re:Most interesting (1)

pwizard2 (920421) | about 3 years ago | (#37403602)

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.)

java? let it die in peace please. (1)

g00mbasv (2424710) | about 3 years ago | (#37403370)

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.

Re:java? let it die in peace please. (1)

zero0ne (1309517) | about 3 years ago | (#37403596)

And even if 5% of the non-paying Java users out there decide to convert to some future paid-java enterprise license version, Oracle ends up winning :(

Re:java? let it die in peace please. (1)

Anonymous Coward | about 3 years ago | (#37403686)

and whats the other choice? .net?

Please, you are just spreading FUD and garbage just to stir crap up, so shut the F up. The only way Oracle can be harmful is to simply not update Java. It's GPL'd, so Oracle can't close it off. Please educate yourself.

Re:java? let it die in peace please. (1)

Desler (1608317) | about 3 years ago | (#37403912)

C, c++, ruby, python, scheme, d and the list could go on and on. Last time I checked those all still existed and weren't magically disappeared.

Re:java? let it die in peace please. (0)

Anonymous Coward | about 3 years ago | (#37405860)

C, c++, ruby, python, scheme, d and the list could go on and on. Last time I checked those all still existed and weren't magically disappeared.

You have got to be kidding.

Re:java? let it die in peace please. (1, Insightful)

snemarch (1086057) | about 3 years ago | (#37404464)

It might be GPL'd, but what about involved patents? Considering how Oracle is playing, I'm mentioning the P word isn't entirely FUD :(

Re:java? let it die in peace please. (1)

ToasterMonkey (467067) | about 3 years ago | (#37405904)

It might be GPL'd, but what about involved patents? Considering how Oracle is playing, I'm mentioning the P word isn't entirely FUD :(

What about the patents Linux
What about the patents Windows
What about the patents OS X
What about the patents .NET
What about the patents Java
What about the patents etc.

Is this the new "think of the children"? Patents are everywhere. Oracle is well defended, so are the others. Take your pick and move on.

Re:java? let it die in peace please. (1)

Billly Gates (198444) | about 3 years ago | (#37403988)

You know it is frustrating because if Java looses so does Linux and Windows wins and becomes more entrenched. Php is the only choice left and web servers are the only servers left running Unix as Windows is eating up everything else in site.

I like to daydream what an alternative universe is like if the DOJ got their way and split MS into 3 companies 12 years ago. C# and .NET are really great and if they existed on Linux the world would be a better place. If they were split my guess is today we would have larger Linux marketshare with many more .NET apis by the communities around the world.

But we just got to accept what we have. MS might be losing the client thanks to IPhones, tabelts, and multiple browsers, but they are eating Linux still on the server and pretty soon will monopolize it and raise prices insanely high. Many PHBs are cheering them on still too.

Re:java? let it die in peace please. (1)

Desler (1608317) | about 3 years ago | (#37404088)

I hear there's this new thing called mono that brings c# and .net to linux.

Re:java? let it die in peace please. (0)

Anonymous Coward | about 3 years ago | (#37404332)

.NET is Windows and is heavily tied to COM/DCOM, VMS/NT style threading, NDIS for any Networking, etc.

It is a losing proposition, buggy, and the web developer ends up being a bug tester for the ported CLI bugs that might have nothing to do with his code. No thank you I will stick with Windows or use Java.

Wake me up when a .NET app can actually compile and run on both platforms. I do not mean your hello world program either. In Java you simply run it.

Re:java? let it die in peace please. (1)

Dogtanian (588974) | about 3 years ago | (#37404864)

I hear there's this new thing called mono that brings c# and .net to linux.

You really only just "heard" that of this "new" Mono, or you were just being so wittily sarcastic and implying that it's a good solution?

It's a great solution!... If you don't mind it being condemned to being perpetually behind the curve, that is, catching up to Microsoft's current version and almost getting there (if they're lucky) around the point that MS release the next one, which they- of course- have a head start on.

And if you don't mind all the bits that are- in the real world- needed for compatibility with Windows .Net applications being on legally shaky ground (because MS hasn't submitted those parts to ECMA or promised not to assert their patents on them).

Given the nature of the .Net ecosystem, most people wanting to use it will likely be exploiting all the related technologies, and not just the "free" core ones that Mono is safe to use (and actually implements). I like how Wikipedia says that "These technologies are today not fully implemented in Mono and not required for developing Mono-applications, they are simply there for developers and users who need full compatibility with the Windows system."

Yes, because people are really going to be interested in Mono if it's not fully compatible with Windows, of course!

MS knows all this damn well, it knows that any other implementation of its "free" and "open" specification will always be playing catch up, but it can point to them as evidence of .Net's "cross-platform" (cough!) compatibility, and benefits from being able to exploit FUD on Mono's (even half-baked) implementation of .Net's non-free ecosystem areas, and even- as a last resort- being able to launch a patent attack on them. Oh dear, you can't run your application under Linux any more because Mono infringed our patents? Never mind, you can run it under Windows instead!

If the Mono developers wish to be MS's "useful idiots" under the delusion that they're doing something worthwhile for free software- rather than encouraging people to dance to MS's tune- well, they have the right to, but they're not.

Re:java? let it die in peace please. (1)

leenks (906881) | about 3 years ago | (#37404872)

mono brings a partial (and buggy) implementation of .NET to linux, that no corporate IT department will let near their systems because it is practically impossible to get any meaningful support for, and is not endorsed by MS as a .NET implementation. Wake me up if that changes.

Re:java? let it die in peace please. (0)

Anonymous Coward | about 3 years ago | (#37405306)

THIS. I'm sick and tired of people bringing mono into the picture like it's some sort of actual legitimate solution for linux support. Try to convince your execs that the risk isn't that high to be running on mono boxes for production systems. I can tell you, THAT will be a short conversation.

Re:java? let it die in peace please. (0)

Anonymous Coward | about 3 years ago | (#37405208)

Windows is eating Linux on the server? Let's see some stats that don't rely on preinstalled OS sales.

Re:java? let it die in peace please. (0)

Anonymous Coward | about 3 years ago | (#37407556)

http://arstechnica.com/microsoft/news/2011/07/microsoft-posts-record-revenue-in-spite-of-flat-windows-market.ars [arstechnica.com]

Server and Tools posted strong figures with revenue for the quarter of $4.64 billion, up 12 percent year on year, and full year revenue of $17.10 billion, up 11 percent for the year. This growth was attributed to Windows Server, System Center, and SQL Server.

Interesting interview (1)

oldhack (1037484) | about 3 years ago | (#37403678)

See subject.

bizare: int i = 1+1+1+1 ... (1)

Fubari (196373) | about 3 years ago | (#37406614)


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.

Cheap Threads (0)

Anonymous Coward | about 3 years ago | (#37407118)

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.

Java on z/OS already has segmented stacks (1)

dgriff (1263092) | about 3 years ago | (#37407212)

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).
Load More Comments
Slashdot Login

Need an Account?

Forgot your password?

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>