4 ms·
> any library that wants to be usable from different languages is still written in it. This part isn't quite true. All that's needed is to be able to define an
by ChrisSD 7y ago
> any library that wants to be usable from different languages is still written in it.
This part isn't quite true. All that's needed is to be able to define an exported function with a specific name and calling convention. Libraries can be written in any language that supports these features.
- codr7 7y agoI used to do some of that in Borland's Object Pascal, which sort of works but isn't much fun. Even C++ is a pain in the behind, because everything that doesn't translate needs to be encapsulated. As a result, it's very rare to find code written in different languages with exported C APIs from my experience.
- fanf2 7y agoAnd the language needs to hide its runtime support so it appears to be as minimal as C