4 ms·
> C++ is designed by its standards committee... When it comes to design, C++ is a good example of why having a benevolent dictator is better than a committee.
by snarfy 9y ago
> C++ is designed by its standards committee...
When it comes to design, C++ is a good example of why having a benevolent dictator is better than a committee. I still think it's a huge mistake to not have a standard ABI and rely on C's ABI.
- maxxxxx 9y agoDefinitely agree about the ABI. In C# it's a pleasure to write libraries for others and use other libraries whereas in C++ it's almost always a pain.
- gpderetta 9y agoStandard ABI only makes sense if you are targeting a single system (.NET for C#). That's not the case for C++.
- snarfy 9y agoIt would definitely making interop between C# and C++ much easier. It would make interop between C++ and any language much easier. The only way to do it today is to extern "C" everything. It's ugly.
- gpderetta 9y agoHow would exactly an library compiled for 32 bit big endian POWER interoperate with a program written for 64 bit little endian ARM?
- maxxxxx 9y agoThis doesn't work with C either or does it? C has a reasonable ABI so maybe we should get to the point where exchanging C++ libraries is as easy as doing this with C
- gpderetta 9y agoThe point is there is no standard C++ (or even C) ABI because it is not possible to standardize one. At best you can standardize a platform specific ABI. Which is in fact what happens in practice on most platforms, but it is up to the platform mantainers and the C++ standard itself can't have nothing to say. Regarding the C ABIs, they are the lingua franca for interchange between languages because, a) as C is semantically poor, it is the minimum common denominator, and b) it is often the OS ABI.
- flukus 9y ago> I still think it's a huge mistake to not have a standard ABI and rely on C's ABI. And rust is going down the same path. Looks like c will reign supreme for shared libraries for the foreseeable future.