7 Languages built with Xtext
The Xtext project has published seven little languages (call them DSLs or not) using a new API for JVM-based DSLs. They are examples and meant to help people understanding how to use the new approach. The basic idea is to allow reusing predefined general language constructs such as expressions and type references and use them at arbitrary places in your custom DSL.
The seven languages solve common problems :
IMHO, one of the main advantages of embedded/internal DSLs over external ones has always been the possibility to call out to the host language. You need things like expressions in most DSLs at some point. Therefore in external DSLs people often start to design half-baked expressions or even worst built the most common use cases into the language just to get stuck again half-an-hour later and add the next half-baked ‘feature’. Other folks hook in or modify generated code and extend it with the needed behavior.
I think these are main problems with external DSLs and that they are completely eliminated with the approach taken in Xtext for JVM languages. At the same time the good parts of external DSLs such as the syntactical freedom, special domain-specific validation and tool integration are still there of course.
We are very happy with the abstractions and are looking forward to feedback from language design experts.
Active forum topics
New forum topics