Version 4 by komaz
on Nov 22, 2010 15:40.

compared with
Version 5 by komaz
on Nov 22, 2010 15:51.

This line was removed.
This word was removed. This word was added.
This line was added.

Changes (3)

View Page History

Therefore, the most obvious way to use DSL expressions is instantiation of some complex objects. For example, imagine we are writing a library for graph manipulation, so we define classes like {{Graph}}, {{Node}}, and {{Edge}}. See [|^Graphs.html] [^]
And imagine that we need to instantiate some graphs for our tests, so we write the code like this:
The source code of DSL plugin can be found [here|^].

So I thought - nice feature, but rarely needed, also the compiler API operates on a quite low-level, so that even simple constructor invocation requires too many code.
Uh, after looking at the source of GraphDsl, the question is - why do we want to write DSL plugins? The same task can be fairly easy implemented in simple static method like {{Graph.fromStr}}. Why anyone want to use heavy low-level Compiler API? The benefit like compile-time validation and generation of compile error on a bad line seems to be too small, almost negligible.
That's what I thought when saw Fantom DSLs for a first time, and then forgot about them almost for a year.

h3. Beyond the DSL src