[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Rather, DSSLs increase modularity, productivity
> Date: Mon, 17 Nov 2003 10:53:27 -0800
> From: "Brent Fulgham" <brent.fulgham@xpsystems.com>
>
> > One of my biggest reservations about the newest crop of Handley-Milner
> > fpls is that they make useful metaprogramming almost impossible.
>
> Oh, I disagree strongly with this assertion. For example:
>
> 1) The C-- project is a compiler that converts "C--" input code to appropriate assembly
> instructions, and it's coded in Ocaml. (http://www.cminusminus.org)
So you can write a compiler in ocaml. That isn't metaprogramming as we are
using the term here. Ocaml is a *great* language for writing compilers in,
BTW.
>
> 2) ML (Meta-Language) was originally designed as a metaprogramming tool.
>
I don't think so. ML was the meta-language for a theorem prover called LCF
(logic for computable functions). meta-language != metaprogramming.
> 3) Please read through Graydon Hoare's "One-Day-Compilers" talk (http://www.venge.net/graydon/talks/mkc/html/mgp00001.html) on implementing program generating programs in OCaml. (Subtitle: "How I learned to stop worrying and love static metaprogramming."
>
That's more like it. You're right on this count. There are also
experimental versions of ocaml and haskell to do template metaprogramming.
Mike