Knowledge Base

What are domain-specific languages and when is their use useful?

Project managers are always faced with whether it is useful for their project to develop domain-specific languages (DSL). Such a DSL usually covers only one aspect or sub-area in the overall project, so it is often the case that several DSLs are used within a project.

Of course, it can also make sense to use an already existing DSL in a project. This is often easier to implement, since there are already very widespread DSLs for certain domains that represent a quasi standard.

However, in this article, I want to provide some clues as to when it makes sense to develop your own DSL.

What are domain-specific languages?

We encounter domain-specific languages in various forms. We distinguish between technical DSLs, such as SQL, MatLab/Simulink, and AUTOSAR on the one hand, and conceptual DSLs such as school timetables or even insurance contracts on the other.

Examples of domain-specific languages:

SQL

SQL is a textual DSL for developing databases.

Example: Select * from employees where salary>=1000 And salary<2000

MatLab / Simulink

Matlab is a tool with a textual DSL that can be used to solve numerical problems, for example. Based on this, Simulink provides a graphical DSL for modeling technical and physical systems.

Example: Control of a Lego robot