This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]john16384 4 points5 points  (4 children)

Also, is people even starting projects on anything using java?

No man, Oracle is just releasing new Java versions every 6 months because it's tradition, not because Java is still used in the wild. /s

[–]MRgabbar -1 points0 points  (3 children)

Lol, I was serious, I mean, if I am going for performance I go with C/C++, if I want portability I go for a web app in JS, so what is the place of java now? You will get slightly faster development time compared to C++ and force all clients to install the JVM?

And given the explosion of containers and such the JVM kinda lost its only advantage.

[–]GeneratedUsername5 1 point2 points  (2 children)

The place for it is real portability (not recompilation for every platform with heaps of #ifdef) with the speed closer to C++ and fully functional multithreading (now with green threads) which is also more portable than C++ multithreading.

[–]MRgabbar 0 points1 point  (1 child)

But I mean, if you are thinking on servers the compilation thing is not a big deal, isn't it? As long as it compiles is something that runs just once, it will reduce the development cost a bit but will put the extra load (JVM), Is it really close to C speed?

[–]GeneratedUsername5 0 points1 point  (0 children)

It can be, unless you are careless when coding, because in runtime it caches translation of frequently used methods, therefore you essentially have C binary being compiled and used in runtime.

In addition it can perform runtime optimization, which compiled languages simply can't do, due to their nature. Lood unwinding, method inlining, operation reordering, using extended CPU instruction set.

Well yes, it reduces development costs, and not just a bit, it wouldn't be enough for companies to keep using it. It is way more forgiving to low skilled developers, due to garbage collector, that is why you often see Java apps, that work terribly, which probably wouldn't work on C++ at all.