Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I really do not want to start a war here, especially because I am not a big fan of C++. Quite the opposite. But I can answer some of your questions in case you genuinely want to hear what I have to say :-)

On expressiveness: I meant things like foreach loops, ruby blocks, python's list comprehensions, in-place on-demand functions, switch statements with strings, pattern matching, list goes on. Java is not much ahead of C++ in that regard. Not a real upgrade.

BTW garbage collection is not really a "feature" of the language. And no, these days people (quality C++ folks) do not spend any time debugging memory leaks. World has changed since early Unix days: smart containers, smart pointers and automatic unit tests largely eliminated memory leaks issues. I honestly do not remember when was the last time I used new() or alloc().

About being crippled compared to C++: do not even get me started. Lack of templates (until relatively recently and they're still not a real thing), lack of multiple inheritance nor mix-ins to replace them, no true functions of any kind, no choice of memory allocation: heap vs stack, this silly "everything is an object" idiom...

Again, quality libraries is something I asked to ignore, because it is really not a part of the language. And you are absolutely right here: Java folks have been enjoying the available pool of tools: an order of magnitude bigger than C/C++ guys ever had.

And, finally, on platform independence. Java does not run on Windows or Linux. It runs on one platform: JVM, which is conceptually is no different from C++ plus some kind of OS abstration layer, similar to what Mozilla/Apache teams have. Basic idea is always the same: language + runtime. Call it JVM or Library or VMWare host. Yes, I can always develop for Linux and run it under a virtual machine on any host OS, This solution arguably even better than "language VM", since you're taking everything you need to run from one host OS to another.



I feel the "platform independence" makes a huge difference, though. I develop on a windows machine, and I can just deploy the binaries on the Linux-Server. I don't have any version headaches for deploying on various platforms. Maybe that is just a small thing and no big deal for make-wizards, but for me it is enough to avoid other settings like the plague. I ran into problems like that when I tried Ruby, btw. It seems there are different versions for Windows which are not compatible with each other (ie Cygwin version or Visual C++ version).




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

Search: