I've been programming since the age of eight or so on a Macintosh with TurboPascal and from there I've done things in BASIC, Visual Basic (you make mistakes while being young), PHP, C++, Python, Perl, Ruby, Groovy and lately Scala. For the most part of my career, I've been a Java professional, developing anything I was thrown into (web, desktop, backend, frontend), but still, I can't see why all the hate to the first/second most used programming language according to the TIOBE index [1].
For the most part, criticisms are:
- Java is slow
- Java is enterprisy
- Java is static
- Java is old
- Java is OO
- Garbage collection sucks[2]
- Autoboxing is lame
- Java code is ugly
- LOC in Java are too many
To all the people who bitch about Java every time they get the chance, respond to this question: which is the alternative to Java?
For Java the language, there are plenty. For Java as a whole, there are none.
You see, Java is not just the language, it's way more:
- The JVM
- The best open source IDE's [3]
- Database drivers for every database [4]
- Plenty of frameworks
- Plenty of ORMs
- Consolidated GUI Toolkit[5]
- Application servers
- Messaging
Big supporters like Oracle, IBM, Google, RedHat and specially ASF. We're not talking here about some guy's personal project, this are big players which have invested enormous amounts of resources and are building their business on or around Java.
Why didn't Google build Android around something else like Python or something new like Go? Why would Oracle acquire BEA and SUN? Here's a short list of some open source communities that work around Java:
- Apache Software Foundation (ASF)
- Eclipse Foundation
- JBoss Community
- Codehaus
- Java.net
And finally, Java is a language that's almost everywhere: web, desktop, mobile. So if you learn Java, you are likely to find a job in pretty much any industry you choose. That's not bad, right? Also, the language is very consistent, statically typed (yes, this is very good), keeps on evolving and can be self documenting and readable if you know what you're doing.
So, are there better programming languages? Sure, and I actually enjoy way more Python and Groovy than Java.
Is there a better environment than Java? Definitively no.
[1] I know, I know.
[2] I don't know why something that does a better job than most programmers is considered bad.
[3] Funny that the best IDE's for languages like PHP, Python, Ruby and others are Java IDE's like NetBeans or Eclipse.
[4] I've got to see the first major database provider that doesn't offer a JDBC driver.
[5] Swing might be ugly, but try any other multi platform GUI toolkit and you'll love Swing.
No hay comentarios:
Publicar un comentario