rleisti•

I've written a DSL for data transformation at my current job; my experience tells me that a DSL has the best chance of succeeding if it is very high level and very close to the problem domain. It should be easy for end-users to understand (for the most part, it isn't the programmers that use my DSL), and well documented.

Basically, there has to be enough of a justification to use the DSL instead of custom code (+ libraries). The justification is increased readability (the business rules are more clear in the language of the DSL than they would be in a regular programming language) and ease of modification (a change to a few lines in the language of the DSL is equivalent to several hours worth of changes/recompiling/testing in a standard programming language).

Also, it should be kept as simple as possible. It is easy for scope-creep to add enough complexity to the language so that you start to question whether it's worth it anymore. The closer the language is to a conventional programming language, the more 'expert' its users must be.

3
recursive•

Partial classes!

(tl;dr)

1
RayNbowOP•

Partial classes!

Shares the same problem as the discussed Generation Gap pattern approach.

Also, I'm sure the author knows about partial classes. The WebDSL compiler at one point actually generates a superset of Java supporting @Partial classes. This superset is then compiled to plain vanilla Java.

3
OMouse•

Ahahaha, that's hilarious! A "software engineer" or computer scientist should be able to pick up any language because all of them share the same basic concepts.

It isn't lock-in. The source code is given, the generated code is given, the code generator is hopefully free software. This is why we can't have nice things...we're forced to keep reverting to some lower level of abstraction.

1