Already someone wrote about the Java Trap, but what I’m going to say here is not about the trap, but about the crap.
It’s my own, personal opinion about Java and why it should always be avoided when possible, as usual it has nothing to do with Gentoo, it’s just me, got that?
First of all, I must to say I love OOP, C++ is my main language if I want to write something complex, but Java is too much cruft for me. I don’t like the syntax, the missing features such as operators’ overloading and the partial inheritance. And I don’t like the speed decrease that it adds to your program.
Now, this decrease was always advertised as a derived problem due to the platform independence of Java: you write and compile it once, and you run it everywhere… Yeah sure, keep on trying…
Let face the reality: a good written C or C++ program is more multiplatform than Java, if you write it with QT or even GTK+ it will be more portable than something in Java.
The first problem is that quite every Java software out there requires Sun’s version of Java, and this means that you are limited to one implementation, which is released just for a few systems: Sun’s Solaris, obviously, Linux i386 and amd64, Windows, OSX. There are a few other implementation such as blackdown and ibm that covers ppc and ppc64 machines and IBM’s operating systems, but this is still limited: there is no Java version native for FreeBSD for example, and you need to build it using unofficial patches.
Also, recent programs started using SWT for the GUI, that binds itself to a native GUI framework such as GTK+, thus requiring access to native libraries to do the work. This means that you don’t have anymore a “no need for native libraries” program, because it really requires them anyway… it’s simpler to just use GTK, isn’t it?
As final note, the “it’s java, it’s in a sandbox, it won’t kill your system” assert is no more valid: using native libraries (such as SWT) let java get outside the sandbox, and SWT is enough to do so. Azureus, for example, can kill your system eating CPU continously, as it goes out of the sandbox.
Be nice, don’t let anyone fall over the java crap, it smells bad 🙂
Unfortunately I’m forced to use Java by my school. We don’t really do much with it though…only console based programs, so we don’t have a problem of going outside the Java sandbox. I really don’t find it very efficient though, even the syntax is somewhat confusing.I’ve learned some C++ this summer (I already know C pretty well) but I have a hard time keeping track of all the multiple inheritance that goes on. I wish I had a good book that covered all of the inheritance, etc. I’ve never seen a book that covered it with any depth at all, most just skim over it a tiny bit. Do you know of one?And what do you think of C#? I recently tried cowbell, and I realized that it was FAST. Very fast to start up, definitely a change from Java.Good work on the GFBSD, I’m keeping my eye on it. 🙂