3 ms·
> I wish Rust, C++, Go, D... could get together and agree on a common ABI/module format. Don't forget C, with the amount of C code out there you'll have to mak
by flukus 8y ago
> I wish Rust, C++, Go, D... could get together and agree on a common ABI/module format.
Don't forget C, with the amount of C code out there you'll have to make sure it can handle this new format. And by the time you limit yourself to the lowest common denominator between all those languages you'd probably just reinvent the C ABI anyway.
- bluGill 8y agoThe point is the C lowest common denominator is a bit low. I'd like something that by dropping C we can be a little higher. I'm fine with the ABI having an explicate this pointer (which python already does for classes) which allows C to call/implement classes as well, but it needs to be in the ABI (languages with first class classes can choose to hide the this pointer and v-table). Operator overloading (which forces name mangling or something like it) is tricky though. As is exceptions. I don't have answers to that.
- flukus 8y ago> The point is the C lowest common denominator is a bit low. I'd like something that by dropping C we can be a little higher. I don't think it really raise the bar much. Rust for example isn't an OO language so classes and v-tables won't be included. Go doesn't have templates so off they go. Operator overloading, multi inheritance, exceptions, garbage collection all go. What your left with is essentially the C ABI. Being this lowest common denominator is why it's the the common ABI just as much as the success of the language.