[Info-vax] Viable versus ideal programming languages

Arne Vajhøj arne at vajhoej.dk
Thu Mar 24 14:25:39 EDT 2022


On 3/24/2022 9:08 AM, Simon Clubley wrote:
> On 2022-03-23, Dan Cross <cross at spitfire.i.gajendra.net> wrote:
>> In article <t1fpab$v69$1 at dont-email.me>,
>> Simon Clubley  <clubley at remove_me.eisner.decus.org-Earth.UFP> wrote:
>>> It seems that everyone falls back to C interface mode when trying
>>> to export functions for use by another language. A quick look around
>>> seems to show that Rust does the same.
>>
>> I suppose that if one's definition of a well-defined ABI is what
>> you are calling a "C interface mode" that's true, but most ABIs
>> are language-independent.
> 
> It's at this point that I mention many languages directly call this a
> C interface mode, including in the syntax that they provide to achieve
> this... :-)

True.

But it really isn't a C thing - it is a calling convention thing.

If we take Rust as an example then you can use:

extern "C"

but you cal also use:

extern "stdcall"
extern "cdecl"
extern "system"
extern "aapcs"
etc.

Arne








More information about the Info-vax mailing list