I'm wondering how this compares to Xtext[1], which is another framework for developing domain specific languages. Xtext feels more approachable to me, but maybe that's because there appears to be a lot more documentation and tooling.
For example, the docs on Xtext's grammar language[2] seem very intuitive to me, even though I'm not experienced in compilers or language design. I don't have quite the same intuition when looking over the AnyDSL docs[3]. Maybe the Xtext docs are just more goal-oriented, i.e. "Five simple steps to your first language".
Xtext and AnyDSL have very different goals. Xtext is mostly about Syntax and IDE-Support, while AnyDSL is about compilation. With Xtext you'll get support for defining the grammar of your language, but you'll write your own compiler for your DSL - the DSL is "deeply-embedded" in the host language Java, that is: represented as a Java datastructure. In AnyDSL, you don't have any support for custom syntax - all your DSLs are basically just "libraries"/types/functions in the host language Impala - a "shallow" embedding. Java examples of shallow embedding are most "fluent interface" libraries, e.g. jOOQ[1].
This has the benefit that you don't need to know about compiler tech to implement your DSL. However, a domain-specific compiler can optimize using domain-specific knowledge and potentially generate faster code. For this reason AnyDSL/Impala provides online partial evaluation with the '@' operator, which aggressively specializes functions and evaluates at compile time. With the right DSL abstractions, this can result in generated code that is as fast as hand-tuned code.
For a more complete view of the relation between partial evaluation and DSL embedding, have a look at the GPCE'15 paper[2].
We totally agree that the website and documentation (there is some in the github wikis) is lacking at the moment and we're working on them. However, AnyDSL is still a young research project.
This has the benefit that you don't need to know about compiler tech to implement your DSL. However, a domain-specific compiler can optimize using domain-specific knowledge and potentially generate faster code. For this reason AnyDSL/Impala provides online partial evaluation with the '@' operator, which aggressively specializes functions and evaluates at compile time. With the right DSL abstractions, this can result in generated code that is as fast as hand-tuned code.
For a more complete view of the relation between partial evaluation and DSL embedding, have a look at the GPCE'15 paper[2].
We totally agree that the website and documentation (there is some in the github wikis) is lacking at the moment and we're working on them. However, AnyDSL is still a young research project.
[1] http://www.jooq.org/doc/3.9/manual/sql-building/sql-statemen... [2] http://compilers.cs.uni-saarland.de/papers/gpce15.pdf