Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why are the interpreters of all popular scripting languages written in C (if not in C at least not in C++)?

I recently asked a question on switching from C++ to C for writing an interpreter for speed and I got a comment from someone asking why on earth I would switch to C for that.

So I found out that I actually don't know why - except that C++ object oriented system has a much higher abstraction and therefore is slower.

  • Why are the interpreters of all popular scripting languages written in C and not in C++?

If you want to tell me about some other language where the interpreter for it isn't in C, please replace all occurences of popular scripting languages in this question with Ruby, Python, Perl and PHP.

like image 725
wndsr Avatar asked Apr 10 '10 19:04

wndsr


1 Answers

C is a very old language, and is thus supported on pretty much every system available. It is therefore a good choice for any project that needs to be ported everywhere.

like image 143
Jason Williams Avatar answered Sep 20 '22 06:09

Jason Williams