3 ms·
Yep, the perma-frozen ABI decision sounded the death-knell for C++. Basically the committee committed collective hara-kiri with that decision. Thou Shalt Not Pr
by lenkite 4y ago
Yep, the perma-frozen ABI decision sounded the death-knell for C++. Basically the committee committed collective hara-kiri with that decision. Thou Shalt Not Progress!
It's so extraordinarily, mind-bogglingly stupid. But I guess it is time for the ageing C++ queen to pushed out of the mortal coil and let Princess Rust grab her long-overdue system crown.
- cozzyd 4y agoI don't know, ABI changes are super annoying.
- pjmlp 4y agoPrincess Rust has no proper throne on the kingdom of binary libraries.
- tialaramex 4y agoWithout ABI change C++ is trapped forever with bad decisions. In some cases these are decisions which were bad twenty years ago and are still bad today but should be fixed, in other cases these are decisions which were probably the right call twenty years ago but now you'd choose differently. Did you know on MSVC a std::mutex is so huge it needs more than one cache line ? Obviously Microsoft aren't stupid, they know how to fix that... but it would change the ABI so they can't touch it. And so the Zero Cost Abstraction promise "Don't pay more than it would cost if you did it yourself" becomes "Eh, just do it yourself" everywhere - C++ programmers learn to hand roll all the basic stuff they need, because ABI stability has ensured the standard library mechanisms are slow, or bloated, or both.
- pjmlp 4y agoDoesn't matter, binary libraries are a big deal for many businesses, regardless of ABI constraints in C and C++ languages and compilers. Either Rust wants to play on that field, or it doesn't. Microsoft has broken their ABI plenty of times, and VS vNext might be when the next break will take place, which was initially planned for VS 2022. Bashing C and C++ ABI issues on HN will do very little for those businesses to adopt source code distributions.
- zozbot234 4y agoYou can write and use binary libraries in Rust, you're just restricted to using the stable C ABI to interface across separately-built components. Spoiler: You'll want to do this anyway, because it's required for any sort of C-compatible FFI regardless of language.
- pjmlp 4y agoNope, Windows C++ compilers have supported DLLs since Windows 16 bit days. Some famous C++ frameworks that ship as binaries are OWL, VCL, FireMonkey, MFC, ATL, WinUI. And WinRT has improved upon classical COM ABI to provide even more data types. On Windows there is a component market selling libraries for those ecosystems. Then we have middleware vendors for game consoles as well. Maybe this isn't a market Rust community cares about and that is fine.
- FrankHB 4y agoThis is not the only case. It harms not only performance, but also conformance, e.g. https://developercommunity.visualstudio.com/t/unable-to-move-stdpackaged-task-into-any-stl-conta/108672 https://developercommunity.visualstudio.com/t/unable-to-move.... Microsoft is stupid enough since the first decision of the implementation impacting the ABI is made. There was no one enforcing such bad decisions shipped into the productions at the very beginning. Both libstdc++ and libc++ have more flexible rules to preventing ABI breakage.