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

One of the things that appeals to me is that Java doesn't have all the extra crap piled on some other languages (yet).

I think there's a lot to be said for picking which features to leave out.

Maybe I'm alone with this viewpoint though.




Unfortunately Java has a lot of extra crap already. I liked the language and was competent in it once, but when version 1.5 added generics and autoboxing, I left for greener pastures. Same thing almost happened to JavaScript this year with ES4, thank god it was cancelled.


Same here, generics are so ugly! I used to think Java is cutting edge with annotations and aspect oriented programming, until I realized that dynamic languages don't even need to add extra "features" to support most (or all?) interesting programming techniques.

Any new features that make it into Java or C# will only make the tutorials longer and the learning curve steeper. Not a good thing.


No, there are serious deficiencies in the language, and I've had to work around them in fairly lamentable ways. The only disadvantage of amending it (from my point of view) is that it will obsolete my work-arounds.


What sort of deficiencies? I think all in all java (the original spec) was a pretty well thought out design.

It's not like several other languages that have to go and add unicode support on later as an afterthought.


  new Thread()
  {
    public void run()
    {
       System.out.println("I'm in a Thread");
    }
  }.start();
In C#:

  new Thread (Go).start();

  static void Go() 
  {
    Console.Writeln("I'm in a Thread");
  }
...C# isn't especially elegant either, but the general uncleanliness of inner anonymous classes is one example of Java's problems.


The C# version would actually be:

  new Thread(() => Console.WriteLine("I'm in a Thread")).Start();


Silly example though, as threads are silly.


Is it really silly? Almost all the code I write day to day is either multi-threaded or event-driven, so the above difference means a very real improvement in my quality of life. The code is simpler, more compact, and easier to understand at a glance months later.

This isn't the only difference, either. C# is never going to be as terse as a scripting language, but with each release they are examining common workflows and streamlining them. Java may be adding in a lot of new features, but the syntactic integration seems awkward at best.

The little things count for a lot.


Gosling didn't leave out features because he thought you didn't need them. He left them out because he thought you weren't smart enough to use them.


"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." --Brian Kernighan

I'm a Java developer - naturally I think Gosling (for the most part) drew the lines in the right places.


Well I don't know about that. There have been a few times that I wrote code as cleverly as possible because I couldn't find a simpler way. And then when I found defects later I was able to debug it, although that took a while.


When I write code as cleverly as possible it's easier to debug, 'cos I've played knifey-spoony before!


Some needed features were left out just because they were going to take a long time to get right, and he had to ship. http://blogs.sun.com/jag/entry/closures


It's not just about being smart. It's about overcomplicating things, making things harder to debug.

Did he leave out unsigned types because he thought we weren't smart enough to cope with them? No, I'd say he left them out because it makes everything simpler. If a programmer wants an unsigned type, he can do it himself.


Java has a lot of crap, actually. Take a look at Java Puzzlers sometime.




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

Search: