DEV Community

Pragmatic Maciej
Pragmatic Maciej

Posted on • Updated on

Answer: What is a domain specific language? Anybody using it? And in what way?

DSL - domain specific language. Let's start what is domain - domain is some defined area, scope. This domain can be web site look, and you have for it CSS and second domain can be web site structure, and here you have HTML.

But, domain can be also Company X…

Top comments (2)

siy profile image
Sergiy Yevtushenko

Most often DSL's are just API's for specific use cases. For example, JOOQ is an framework for writing SQL queries in Java. It's API is basically a DSL for convenient writing of (even complex) SQL queries. Most often (I'd say I saw no exceptions yet) such an API is designed as fluent style API.

Sometimes DSL is implemented as standalone language, for example protobuf protocol definition files is a DSL for description of data formats transferred over network.

There are also languages which support convenient creating of DSL's, for example Groovy and Kotlin.

sshanzel profile image
Hansel Solevilla

R, i would say. It is intended to use for statistical analysis and some sort.