Whats the point of different programming languages?

Pages: 12
N3599: proposal for literal operator templates for strings includes a motivational example for typesafe printf.

Some people are labeling C as a universal language here. I disagree. It's the ABI that C functions are generally called with that is more universal. Any language can support that ABI. For instance, in C++, you can add an `extern "C"` specifier to acquire this kind of linkage.

Rust, D, and various other compiled languages support this. But that doesn't mean that C itself is the cause of that ABI since it doesn't define that ABI, the OS generally does (meaning it can differ per OS). Any language can define that ABI.

This is why I don't understand the use of C if your only intention is to have a more universal API exported from your library since you don't need to use C to accomplish that.

EDIT: As to why there are many different programming languages, I feel like that's a similar question as to why we don't have a universal spoken language. I don't know the answer to that one either but I'd imagine preference and a seemingly natural progression with time.
Last edited on
Topic archived. No new replies allowed.
Pages: 12