3 ms·
Lua and Awk are written in C. Scheme is often written in another Lisp or C, and many Prologs are written in C or Lisp (or other Prologs). Erlang's VM is written
by silentbicycle 17y ago
Lua and Awk are written in C. Scheme is often written in another Lisp or C, and many Prologs are written in C or Lisp (or other Prologs). Erlang's VM is written in C, though it was originally prototyped in Prolog. It's not unusual to write scaffolding for a language (i.e., an interpreter or a VM) in C, and then to write most of the rest of the language in itself. It can be a reality check on the expressiveness of the language.
If you want to learn how to implement a language, I'd suggest starting with a subset of Scheme or Forth. If you leave the advanced features (e.g. continuations) for later, they're really not that complicated. You're better off using a language with garbage collection and good string support, such as Python (though if you're already comfortable with them, OCaml and SML are particularly appropriate.) Mainly, you don't want to have to figure out garbage collection, complex parsing, etc. on top of everything else. Also, don't worry too much about efficiency when you're still feeling out a language's overall design.
There's a great explanation of a Forth here (http://www.annexia.org/forth http://www.annexia.org/forth), and pedagogical Scheme texts aren't hard to find. Christian Queinnec's _Lisp in Small Pieces_ is particularly good.
Also, claiming to be "faster than C" is one thing, but claiming to be "a faster way to get things done than C" is another. The difference is significant, particularly when you can prototype your ideas in something flexible, get hard data from a profiler, and then just move the hotspots out to C. C has its strengths, but exploratory programming is not one of them.