in reply to Core computer science in Perl
Since Perl is an excellent language for parsing data of almost any kind, has any body used it for more intense purposes like writing compilers and interpreters. I am not speaking of languages like Forth, but rather more serious production scale compilers for languages like Java, Scala etc
While Perl is good at parsing, it is not really terribly well suited for compiler writing, which really requires a completely different set of features. Languages like Haskell and ML are really nice and easy to write compilers/interpreters in, and in general if I were to write a compiler I would opt for a strongly typed language like Haskell, ML, Java, etc. instead of a dynamic language like Perl.
Are there any books/Resources which show how one can develop Compilers and Interpreters using Perl?
Well, there is an online book about writing a Schema interpreter in Perl and I have a mostly complete Scheme-ish Lambda Calculus interpreter on github. There is also a Javascript Interpreter on CPAN which (according the README) is alpha quality but works. If you search for "Interpreter" or "Language" on CPAN a dozen or so other ones come up for languages such as Piet, Befunge, Prolog and a subset of OCaml called MiniCaml, to name a few.
|
|---|