4 ms·
Are they flogging a dead horse? C++ is, should be, like COBOL. A very important language because of the installed base. But why the continual enhancements? Sur
by worik 2y ago
Are they flogging a dead horse?
C++ is, should be, like COBOL. A very important language because of the installed base. But why the continual enhancements? Surely there are better uses of all those resources?
- MrRadar 2y agoCOBOL is being actively developed as a language, the latest standard was published in 2023.
- arjonagelhout 2y agoAlthough there are excellent alternatives to C++ such as Rust, C++ is still widely used as many open-source and commercial codebases are built with it. Adding features to a language that is still actively used does not seem like a bad thing.
- bitexploder 2y agoThe amount of C++ written at my company every day is… a lot. We are slowly fighting away from it towards memory safety, but it is hard. It will take a decade.
- arjonagelhout 2y agoAt the company I currently work for we also use C++, and I am quite proficient in it. But the amount of times I have slowed myself down by simple lifetime issues makes me want to switch to a more memory safe language. Whether that is C++ with profiles or a whole new language such as Rust. For example, a week back I lost a few hours finding a segfault bug in C++ code, which ended up being a trivial lifetime error: I used a reference after it was invalidated due to a std::vector resize. These kind of errors should be compile time errors, rather than hard to trace runtime errors. How does your company go about changing to memory safety? Are new projects / libraries written in Rust for example? Do projects / libraries get (partially) rewritten?
- bitexploder 2y agoIt is very hard to reason about lifetimes and they can eat you. We have a lot of guidelines and strategies to simplify it, but it still just isn’t amazing.
- dietr1ch 2y ago> Are they flogging a dead horse? Not exactly. There's a lot of C++ code that still can't be rewritten into cool languages overnight without risking correctness, performance and readability. I'm always happy to see C++ pushing itself and the compiler backends as it benefits the victims of lame codebases and also the cool kids using the improved compiler backends.
- jcelerier 2y agofrom which other language can I make a GUI with Qt while doing low-level graphics and DSP?
- binary132 2y agoProbably zig tbh
- tauoverpi 2y agoYep, there's the range https://github.com/rcalixte/libqt6zig https://github.com/rcalixte/libqt6zig to https://microzig.tech https://microzig.tech and soon https://github.com/ziglang/zig/issues/2683 https://github.com/ziglang/zig/issues/2683 then follow-up issues are resolved.
- dralley 2y agoWhy is Qt the only option? Rust has plenty of suitable options. Slint is used in production and works on tiny embedded devices.
- vhantz 2y agoName one of those plenty suitable options rust have to replace something like Qt.
- emmelaich 2y agohttps://www.egui.rs/ https://www.egui.rs/ is not a million miles away. As far as I can tell it requires Gl or WebGl though.
- 5d41402abc4b 2y agoQt is more than a GUI framework. https://doc.qt.io/qt-6/modules-cpp.html https://doc.qt.io/qt-6/modules-cpp.html
- devnullbrain 2y agoThe resources here are amplified elsewhere. As a specific example, expanding constexpr means a codebase I recently worked on can move away from template metaprogramming magic to something that is more idiomatic. That means iterating on that code will be easier, faster, and less error-prone. I've already done static dispatch using constexpr and type traits that would have taken longer to do with templates. Currently constexpr programming needs you to know the specifics of what is supported - ideally you'll be able to infer that from first principles of the invariants that are available at compile time. That leads to faster, more confident development. It's a similar story for reflection: we were using custom scripts and soon won't have to. The changes usually come out of the problems people are already finding solutions for in the real world, rather than gilding a lily.
- moshegramovsky 2y agoDo you like using a fast web browser?
- jsphweid 2y agoI think it'd genuinely boggle some people's minds just how much new c++ code is written everyday. It's not a dead horse at all.
- HelloNurse 2y agoI'm afraid plenty of programmers decided to break up with C++ and turn to easier languages after having enough of it, usually forever and in anger. This doesn't make C++ dead, even if it is dead to them; see Aesop's fable about the Fox and the Grapes for an in-depth analysis.
- mystified5016 2y agoAsk yourself why any programming language gets any changes once there's an arbitrary number of users.