3 ms·
But what would you put in such an ABI beyond what's in the C ABI? Beyond basic data types, struct defintions, and function definitions, languages begin to wildl
by wilsonthewhale 8y ago
But what would you put in such an ABI beyond what's in the C ABI? Beyond basic data types, struct defintions, and function definitions, languages begin to wildly diverge almost immediately.
- jcranmer 8y agoMultiple return values. Ownership annotations. SIMD type support. String charset information. More challenging would be to include stuff like allocation management (how to free a pointer when it's done), GC integration, function boxing, iterator/generator support. Vtables and cross-language inheritance is interesting but difficult. One point of clarity: this would be an FFI ABI, not necessarily expecting that most datatypes would be laid out according to the ABI.
- ChrisSD 8y ago> Vtables and cross-language inheritance is interesting but difficult. Windows' COM "solved" that problem. For example see C++/WinRT[0] for a modern C++ interface to COM. Or the C# .NET equivalents. [0] https://github.com/Microsoft/cppwinrt https://github.com/Microsoft/cppwinrt
- int_19h 8y agoTake a look at this. https://github.com/Microsoft/xlang https://github.com/Microsoft/xlang