I have been developing Java since 1996. I have a written a lot of Java so I'm probably a pretty strong example of a Java developer. I'm an above average developer (and that might be generous) but not much of a hacker.
So let's get to it.
Is Java clean and beautiful? Sure, it's easy to read and just about anyone who has read any other language can figure out what's going on.
Is Java powerful? You can do just about whatever you want with it. Early on it was pretty tough to get to the native level but that has become less of an issue over the years. It still doesn't do graphics all that well so it's never been a great option for game development.
Do people love programming it? Programming is tedious work and good languages help reduce the tedium. I'm not sure Java reduces the tedium enough, it may even increase it. But this is what makes it cleaner than other other languages. Sometimes the tedium that it doesn't reduce is how others can come in and know what I was thinking then I developed it. However, POJOs with getters and setters are tedium no one explicitly needs.
I'm currently working on a new project (in Java) that I found I was building more classes than I felt I needed. A lot of getters and setters, object managers for each object, DAOs for each object, and each object itself. All that before anything even makes it into or out of a database. I thought if it would be easier in any other language and the answer was yes, but only temporarily. Once this boilerplate stuff is done I would have a very robust application that is easy to refactor if necessary and just about anyone can add to it will little trouble.
That said, I've been meaning to try out scala and python. I tried ruby but found it a little too young (but that was a couple years ago). I also said I'm not much of a hacker so I tend to spend my free time doing things other than development. I'll probably get around to learning those languages right after I learn to play the piano and can speak fluent German.
>Is Java clean and beautiful? Sure, it's easy to read and just about anyone who has read any other language can figure out what's going on.
Easy to read? What? Let me do a simple comparison. Let's say there's a site, ycombinator.com, that wants to ban anyone who posts "First post!" on a story. Here is what the python code would look like:
if "first post!" in comment.text.lower():
comment.user.ban()
Here's what the Java code would look like:
public static void class PostPunisher extends PostHandler raises Exception {
public void PostPostHook(Comment comment) {
if (comment.text.to_string().to_lowercase().contains_substring("first post!")) {
comment.User.Banner.execute();
}
}
}
Well, I left off a few factory factories there, but you get the picture.
Java doesn't require a class, it doesn't require a method, it doesn't require a factory. There is literally zero difference between the python example and my Java example except the syntax between the languages.
You just felt the need to unnecessarily obfuscate the code to suit your argument.
I believe my last post clearly showed that I disagree.
There is no 'boilerplate' required with Java. Anyone can obfuscate Java, or any language, and make code that is overly and unnecessarily complicated. Some do it because they don't know better. Some, like yourself, just do it to be an ass.
I wasn't doing it to be an ass. Even if you are allowed to manipulate the class function you're dealing with (and so spare new classes), most java code does look like the example I gave: lots of verbiage, having to create special classes (including [verb]-er classes). Very, very unpleasant to read, and not big on beauty either.
One of the reasons that I really like the Groovy language as an alternative to Java is that it's features often save you typing (for example getters/setters on a POJO) but still allow you to get in and override the default behavior. So it increase productivity, and reduces pain without reducing the expressiveness.
So let's get to it.
Is Java clean and beautiful? Sure, it's easy to read and just about anyone who has read any other language can figure out what's going on.
Is Java powerful? You can do just about whatever you want with it. Early on it was pretty tough to get to the native level but that has become less of an issue over the years. It still doesn't do graphics all that well so it's never been a great option for game development.
Do people love programming it? Programming is tedious work and good languages help reduce the tedium. I'm not sure Java reduces the tedium enough, it may even increase it. But this is what makes it cleaner than other other languages. Sometimes the tedium that it doesn't reduce is how others can come in and know what I was thinking then I developed it. However, POJOs with getters and setters are tedium no one explicitly needs.
I'm currently working on a new project (in Java) that I found I was building more classes than I felt I needed. A lot of getters and setters, object managers for each object, DAOs for each object, and each object itself. All that before anything even makes it into or out of a database. I thought if it would be easier in any other language and the answer was yes, but only temporarily. Once this boilerplate stuff is done I would have a very robust application that is easy to refactor if necessary and just about anyone can add to it will little trouble.
That said, I've been meaning to try out scala and python. I tried ruby but found it a little too young (but that was a couple years ago). I also said I'm not much of a hacker so I tend to spend my free time doing things other than development. I'll probably get around to learning those languages right after I learn to play the piano and can speak fluent German.