Re: Writing Compilers in Functional Languages

Neelakantan Krishnaswami <neelk@cs.cmu.edu>
28 Apr 2005 14:53:03 -0400

          From comp.compilers

Related articles
Writing Compilers in Functional Languages onlyafly@gmail.com (Kkaa) (2005-04-26)
Re: Writing Compilers in Functional Languages bobduff@shell01.TheWorld.com (Robert A Duff) (2005-04-28)
Re: Writing Compilers in Functional Languages stephen@dino.dnsalias.com (2005-04-28)
Re: Writing Compilers in Functional Languages cm.abo@aktivanet.de (Christian Mueller) (2005-04-28)
Re: Writing Compilers in Functional Languages torbenm@diku.dk (2005-04-28)
Re: Writing Compilers in Functional Languages arthurvl+news@cs.uu.nl (Arthur van Leeuwen) (2005-04-28)
Re: Writing Compilers in Functional Languages tarvydas@allstream.net (Paul Tarvydas) (2005-04-28)
Re: Writing Compilers in Functional Languages neelk@cs.cmu.edu (Neelakantan Krishnaswami) (2005-04-28)
Re: Writing Compilers in Functional Languages awwaiid@thelackthereof.org (Brock) (2005-04-28)
Re: Writing Compilers in Functional Languages torbenm@diku.dk (2005-04-30)
Re: Writing Compilers in Functional Languages neelk@cs.cmu.edu (Neelakantan Krishnaswami) (2005-05-02)
Re: Writing Compilers in Functional Languages alcremi@pobox.com (Alain Cremieux) (2005-05-03)
Re: Writing Compilers in Functional Languages YRassokhin@luxoft.com (2005-05-05)
Re: Writing Compilers in Functional Languages ali@olympe.ch (Ali Al-Shabibi) (2005-05-13)
| List of all articles for this month |
From: Neelakantan Krishnaswami <neelk@cs.cmu.edu>
Newsgroups: comp.compilers
Date: 28 Apr 2005 14:53:03 -0400
Organization: Carnegie Mellon Univ. -- Computer Science Dept.
References: 05-04-068
Keywords: functional
Posted-Date: 28 Apr 2005 14:53:03 EDT

Kkaa wrote:
>
> I've written a few compilers and interpreters in procedural and
> object-oriented languages (in particular Java, C, C++, and C#), and
> these seem to be popular choices, but I would like to write my next
> one in a functional language. Every compiler text I've read assumes
> that you are writing your compiler in a procedural or OO language.
> Are there any books or online resources that instead focus on using
> functional languages as implementation languages? I'm considering
> using Haskell or Scheme, but I'm hoping that the resources won't
> assume a particular functional langauge.


Try Andrew Appel's _Modern Compiler Implementation in ML_. It uses
Standard ML, but translating to Haskell should be fairly straight
forward.


Incidentally, if you haven't written a compiler or interpreter in a
modern functional language before, you're in for a treat -- algebraic
types and pattern matching, in particular, make it dramatically easier
to write a compiler in an FPL than in a traditional language.


--
Neel Krishnaswami
neelk@cs.cmu.edu



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.