3 ms·
It is not only legacy reasons why people are "stuck" with C++. In embedded and real-time applications, using a high level (GC'ed) language like Haskell is tota
by mlang23 6y ago
It is not only legacy reasons why people are "stuck" with C++. In embedded and real-time applications, using a high level (GC'ed) language like Haskell is totally out of the question. D and Rust might be feasable, but typically lack the FFI you need for integration. I mention this because I recently wrote a DSP program for a (eurorack) synthesizer module, and C++ was pretty much the only sensible option. And I actually used variant in that codebase, even sending a (trivially copyable) variant over a RT queue to separate RT thread from UI. And std::visit was pretty useful in that context. I dont think it makes sense to rant against particular language/library features. Almost all of them are there fore a reason. It might just be that you dont see the reason right now. The design space for code is huge.
- socialdemocrat 6y agoYou are specifically describing being stuck with C++ for legacy reasons despite trying to disprove it. You say you cannot use D and Rust because of the FFI needed for integration. How is that not a legacy issue? You got existing C++ code you need to integrate with. How is that not a legacy issue? What I am talking about is that if you don't have to use a C++ library to solve your task, there is simply no sane reason to pick C++.
- mlang23 6y agoFrom such a futuristic point of view, I guess you are right. However, it will likely take a few decades until your wish is granted and everything has been rewritten language X. Calling all interfaces your OS gives you legacy is pretty far stretched man :-)