3 ms·
Many non-extern C++ names are mangled in .so files, not just operators. I don't see how that affects the ABI (i.e. the calling conventions of the functions). It
by asdfasgasdgasdg 6y ago
Many non-extern C++ names are mangled in .so files, not just operators. I don't see how that affects the ABI (i.e. the calling conventions of the functions). It just means you need to use a library to demangle in order to call the correct function.
- dnautics 6y agoYes, and it is a choice to not support any of them due to complexity. And as a result, you don't get operator overloading. Zig supports C ABI, not C++ ABI.
- asdfasgasdgasdg 6y agoYou are confused. Supporting the C ABI and operator overloading are orthogonal. One is about conventions for saving registers and such. The other is about the naming of functions. Zig probably has a principled reason to not support operator customization, but ABI concerns aren't it.
- dnautics 6y agoYou were the one that brought up C++, so if I'm confused, it's because what you wrote.
- asdfasgasdgasdg 6y agoI did bring up C++, but I did not bring up operators. The question at hand is whether ABI concerns prevent operator overloading. Plainly, that is not an issue.