3 ms·
If I could design my own cross-language ABI, I'd make these differences from C: * Use fixed-size types instead of the 5 types for 4 integer sizes (is long 32-b
by jcranmer 5y ago
If I could design my own cross-language ABI, I'd make these differences from C:
* Use fixed-size types instead of the 5 types for 4 integer sizes (is long 32-bit or 64-bit?)
* Allow multiple return values [so you could use multiple return registers, especially on non-register-starved arches]
* Allow unwind ABI (C has no way to permit unwinding!)
* Dedicated types for pointer + size for arrays
* Dedicated string type (i.e., distinguish between &[u8] and &str in Rust terms)
* Something that allows for vtables would be nice
* Something that encodes ownership (and eventual deallocation) is also potentially valuable