Alex Rivera | Logout

How can a programming language be "implemented"?

Asked 2010-06-30T12:14:19.747
27

maybe this is just a little misunderstanding but how can a programming language be implemented?

I'm not talking about how to implement my own programming language but about the word "implemented"? I mean, you can implement a compiler or an interpreter, but a programming language?

What does it mean if I read "C++ is implemented in C" or "Python was implemented in C"?

I think a language is more sth. like a protocol of how someone thinks about things should be implemented. For example, if he wants do display a messagebox he can say the command for this is ShowMessageBox(string) and implement a compiler who will translate this into something that works on a computer (aside from the selected programming paradigms he imagines).

I think this question leads to the question "what is a programming language in reality"? A compiler, an interpreter or just a documented language standard about how things should be implemented in a language?

[EDIT]

Answer: Languages are never implemented, only compilers/interpreters etc. It's this simple.

Edit
Report

1 Answer

1

The statement "Language X is implemented in Language Y" makes sense and is true if and only if there exists a canonical implementation of Language X and that implementation is written in Language Y. In common usage, either the first or the most popular implementation is often assumed to be canonical.

For example, Perl is one of the few languages with a definitive canon. "Python is implemented in C" makes sense if CPython is taken to be the canonical implementation of Python, and "C++ is implemented in C" is true for CFront, the original implementation of "C with classes" by Bjarne Stroustrup.

answered 2010-06-30T14:40:17.290

Your Answer