News for hackers. Stuff that matters.
Re:Why artificially limit your code to C? by TheNewAndy on Saturday April 14, 2012 @02:20AM (#3840096)
I'm not sure what you mean here by "name another language". Do you mean other than C? I don't understand what that would demonstrate.
Re:Why artificially limit your code to C? by pjmlp on Saturday April 14, 2012 @10:17AM (#3840885)
For example, Lisp, Scheme, Ada, Modula-3, Delphi, D, Go, Oberon don't have compiler implementations that produce object files compatible across vendors.

Usually you are only able to link to libraries compiled with the same compiler. The same way as it happens to C++.

Re:Why artificially limit your code to C? by batista on Saturday April 14, 2012 @07:15AM (#3840556)
That it's not that common?
Re:Why artificially limit your code to C? by pjmlp on Sunday April 15, 2012 @04:52AM (#3843178)
No, because language standards only specify the language itself not the implementations.

So each vendor comes up with its own library format and tricks how to make the language usable in dynamic libraries. And as far as I know, they seldom talk among themselves about common ABIs.

C ends up being used as universal ABI, because in the end all implementations that generate native code need to interface with the operating system, which usually is developed in C.

But this was not always like this. Before C won its place as system programming language outside the UNIX world, there were other systems programming languages in use. On those systems there was no C ABI as such.

The Pascal calling convention ABI exists, because on the early 80s a few operating systems were developed in extended version of Pascal, like the first MacOS, for example.