Compile-time AST manipulation API

0ffh frank at frankhirsch.youknow.what.todo.net
Sun Nov 25 04:21:35 PST 2007


Maël wrote:
> Take a look at OCaml / CamlP4, this is exactly what you are looking for, and this is done in a truely nice and (extremely) fast (as always when it comes to OCaml ...) way.
> In my opinion, CamlP4 is one of the biggest advantage of OCaml, because it truly permits to implement full DSL, or to couple a DSL to OCaml code in a transparent way, so for instance you can define a logic DSL, and have things like
> [...]
> and this certainly is useful in many ways 

Thanks for the tip. I took a look at O'Caml earlier, but to be frank,
functional languages turn me off... =)

I have been imperating since I was a small boy, and I'm reasonably good
at it. But when I look at, say Haskell, Clean, Caml, the syntax alone is
enough to turn me off. I find those even more repulsive than Lisp.

That's not to say that I do not appreciate how powerful those languages
are. But it's perfectly possible to have metaprogramming in an imperative
languages with C-style syntax, you don't need to go functional for that.

regards, frank



More information about the Digitalmars-d mailing list