3 ms·
Why is Java used in low latency systems? Isn't C++ a better choice there?
by nnoitra 4y ago
Why is Java used in low latency systems? Isn't C++ a better choice there?
- thriftwy 4y agoC++ is actually an esoteric language, not unlike Haskell or Prolog. It is just a widely used one, for historical reasons. Meanwhile, you may just get things done in Java without giving much thought.
- icedchai 4y agoWhen there are orders of magnitude more people working with C++ compare to Haskell or Prolog, I would hesitate to call it "esoteric." The problem with C++ is everyone uses their own little dialect, ranging from little more than C with classes / nicer syntax, to every new "modern" feature under the sun.
- twhitmore 4y agoIt works 24/7, I guess. Reliability is the key -- it stays running. It's got a vast array of third-party libraries available. It performs pretty well even in a low-latency environment. Developers can spend time solving actual business problems, rather than waiting to compile, fooling around with memory allocation, templating problems & inefficient STL data structures, or badly handrolling data structures. There is a little extra work to stay within a latency envelope, but there are definitely productivity boosts from just forgetting all the old C legacy and being able to work at a higher level of thinking. Even better, use the JVM but try Kotlin as a language.