[Info-vax] Viable versus ideal programming languages
Arne Vajhøj
arne at vajhoej.dk
Wed Mar 23 16:58:58 EDT 2022
On 3/23/2022 2:35 PM, Simon Clubley wrote:
> It seems that everyone falls back to C interface mode when trying
> to export functions for use by another language.
Not really.
Almost all languages has a way to specify:
- do not mangle/decorate the function name
- use platform specific calling convention
And some like to call that C interface.
But it really isn't.
Not mangling/decorating is a common concept.
Platform specific calling conventions are
not C specific.
VMS calling convention is not. The stdcall is
not. The cdecl comes from the C world
as the name indicates, but are not
tied to C.
The only interfaces that are really C interfaces
are when the declaration does something under the
hood to actually match C expectations like
passing a string as a zero terminated byte array
even though the language use a different convention
for strings.
Arne
More information about the Info-vax
mailing list