Hacker News new | past | comments | ask | show | jobs | submit login

James Gosling has contributed more to humanity than the overwhelming majority of people who have ever lived. I think he deserves better than this narrow, one-sided libel.



I can attest to many mortgage payments successfully made thanks to Java.


Really? By inventing Java?


Absolutely. Java was the first mainstream language with automatic memory management and garbage collection. You have to remember that before that people were building line of business applications in C or C++.

Java made it possible for average engineers to turn out relatively reliable applications, in a fraction of the time it'd have taken them with any other option (apart from Smalltalk but it was already niche by then).


Also, Java’s JDBC was hugely helpful in standardizing sql/rdbms database access for enterprise programmers.


> Java was the first mainstream language with automatic memory management and garbage collection

Wouldn't this be Lisp?


No, no. Mainstream is actually a stream in Scotland, pronounced a lot like "mine stream", and also the name of the surrounding region and a village therein. The programmers living in Mainstream are True Scotsmen, and the first garbage collected language that these True Scotsman Mainstream programmers used was in fact Java.


I don't particularly like java. Most don't. But it's undeniably well designed.

Some of its design choices have fallen out of favour in recent times—I still disagree with their elision of unsigned integers—but they're generally at least defensible.


No, it is not well designed. Just about every major feature has something incidentally or fundamentally wrong. It is proof that a language does not need to be good to succeed. But it does need a miracle.

Java took off because it offered developers a path out of serfdom to Microsoft, at a time before the smartphone era somewhat reduced their market power. Once it had enough users to benefit from network effects, its future was assured. It took Sun putting billions of dollars into promoting and supporting it to get there.

Sun's commitment to Java probably killed the company, in the end.

There were better-designed languages at the time, and there have been plenty of much better-designed languages since, that have or will fail to displace it. Rust might be counted among these.


Rust and Java are so far apart it's not even funny.

Can you give some examples of parts that are not well designed?


Not GP, but there's a type unsoundness bug with the fact that you can assign an array of a subtype to an array of a super type (apologies if my syntax is off; I haven't written Java in a while):

class Animal {} class Cat extends Animal {} class Dog extends Animal {}

Animal[] cats = new Cat[1]; Animal dog = new Dog(); cats[0] = dog;

This will compile fine but throw an error at runtime. The only possible way to avoid runtime errors with assigning a Cat array to an Animal array is if you only put Cats in it, at which point it would make more sense to just use a Cat array, so it would have been better design to make assigning a Cat array to an Animal array a compiler error.


Huh, I'm surprised the problem is present. Presumably this is valid?

  Animal[] a = new Animal[2];
  a[0] = new Dog();
  a[1] = new Cat();
If you can upcast Cat to Animal, why can Cat[] not be converted to Animal[] in the same way?


Depends on whether you intend to write into the array, or only read it.

If you could make sure the array is read-only (which you can't, in Java), it would make sense to say that "Cat[]" is a subclass of "Animal[]".

The problem happens when you write. "Animal[]" means that you can put any kind of animal (not just Cat) into the array; and this is not true about "Cat[]"; therefore, "Cat[]" shouldn't be a subclass of "Animal[]".

Unfortunately, Java treats "Cat[]" as a subclass of "Animal[]", and then runtime errors can happen when you write to the array. And because of backwards compatibility, this problem is not going to go away.

Later they got it right with generics. "List<Cat>" is not a subclass of "List<Animal>". (But both of them are subclasses of "List<? extend Animal>", which means: a read-only list of Animals.)


> If you can upcast Cat to Animal, why can Cat[] not be converted to Animal[] in the same way?

Basically, because it's not type safe (for the reason I gave above). It doesn't really help expressivity to be able to assign a Cat[] to an Animal[], but as you can only use it safely if you only put cats in it, so you might as well just make the variable Cat[] instead of Animal[]. See the section on arrays in this wikipedia article: https://en.wikipedia.org/wiki/Covariance_and_contravariance_...


Generally - but signed bytes (at least as implemented) are really fucking stupid.


Guy Steele,[1] Java spec co-author, LL1 Mailing list (2003-08-21):

> And you're right: we were not out to win over the Lisp programmers; we were after the C++ programmers. We managed to drag a lot of them about halfway to Lisp. Aren't you happy?

* https://people.csail.mit.edu/gregs/ll1-discuss-archive-html/...

A follow-up noted:

> Yes! Java broke C++'s monopoly, and now C# is breaking Java's, and this sequence of broken monopolies dispelled the belief that have to use "the standard language", and now I code in Python for a living.

[1] https://en.wikipedia.org/wiki/Guy_L._Steele_Jr%2e

Steele is/was well-acquainted with the bad parts of Java—he helped design Scheme after all. But in the alternative timeline where Java was not created, Java (and other machine-independent runtimes) would have not have become popular, and everyone would still be statically compiling C++.


> But in the alternative timeline where Java was not created, Java (and other machine-independent runtimes) would have not have become popular, and everyone would still be statically compiling C++.

I don’t know if that’s actually true. Computers were getting more and more powerful in the 90s, and hence more capable of supporting memory-managed and dynamic languages. Had Java not existed, I think that there’d be a very good change that Smalltalk or Lisp would have taken off instead. Indeed, looking at the late 90s, I think that there’s a good chance that the world would have gone with Smalltalk, and the computing industry would actually be light years ahead of where we are now.


Yeah, like it or not, but technologies that changed the World and gave tremendous boost in adoption of IT were C, SQL, Visual Basic and Java.


"We were not out to win over the Lisp programmers; we were after the C++ programmers. We managed to drag a lot of them about halfway to Lisp." - Guy Steele



Well, the "overwhelming majority of people" have not done even that...


You must be a Java programmer.


> James Gosling has contributed more to humanity than the overwhelming majority of people who have ever lived.

Not more than stallman though. Nowhere close to stallman.

> I think he deserves better than this narrow, one-sided libel.

Richard Stallman has contributed more to humanity than the overwhelming majority of people who have ever lived - including gosling. I think he deserves better than this narrow, one-sided libel. See how that goes. Or how about we let people have their say? Regardless of how much they contributed to humanity.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: