13 ms·
> And yet they claim it's a systems programming language. C++ also doesn't guarantee a stable ABI, and even the C ABI is only de facto standardized on various
by kibwen 10y ago
> And yet they claim it's a systems programming language.
C++ also doesn't guarantee a stable ABI, and even the C ABI is only de facto standardized on various platforms, nothing is provided by the language standard itself.
- dom0 10y agoC and C++ ABI is implementation defined. All major platforms have a standard ABI for both, although sometimes it's broken intentionally. E.g. MinGW uses a GCC/Linux-like C++ ABI and not the MSVC C++ ABI. Note that "platform" means e.g. Linux-x86-64 and not Linux. Linux-ppc has different rules, for example.
- jjnoakes 10y agoNot true for c++ unless you include the compiler and version in your "platform".
- cryptonector 10y agoBut then again, C++ isn't really a systems programming language, though a subset can be. The C ABIs are basically the ABIs published by each OS on each architecture, and typically they derive these from the ABIs published by the CPU vendors. Third party C compilers are expected to adhere to a platform's C ABI, and generally they do. Rust absolutely could be a systems programming language, but it will need at least repr(C) and such options to interface with: a) hardware, b) code not written in Rust or compiled with a different version of the Rust compiler. Sometimes (b) means "with itself", e.g., via structs saved in files with no additional encoding.