2 ms·
I have seen much larger applications written in Java than in C++; does that make Java a "real alternative?" I am a JVM fan and I dig Lisp, but for the purposes
by eropple 14y ago
I have seen much larger applications written in Java than in C++; does that make Java a "real alternative?"
I am a JVM fan and I dig Lisp, but for the purposes I use C++ for (game development, other high-perf code): no, Java is not a viable alternative and neither is Lisp. Two reasons for Java: generics and garbage collection. Generics are great for about 90% of what I do but templates provide similar flexibility and type-safety (better, really, than Java generics) while preserving fairly preposterous performance characteristics. And, generally speaking, I'm better at managing my memory than the runtime is in cases where I have a well-conceptualized object model[1] and a strong grasp of what's being done where; I can do without the overhead of stop-the-world garbage collection.
Lisp has similar object-lifecycle issues and (this is a personal beef) at least Common Lisp lacks strong static typing, so it's a non-starter. Worse than Java for my purposes.
Again, I dig these for where they're good, but C++ has a well-deserved stranglehold on its niche. It's not perfect--a project run by a friend of mine[2] is attempting to do it one better--but it hasn't become king of this area by accident.
[1] - A "large application" does not always mean a large set of objects and interactions. Just a lot of interesting things with them. =)
[2] - https://github.com/Ides-Language https://github.com/Ides-Language