74,487 views
24 votes
24 votes
What is an example of domain specific language.
The LA kind not computer programming

User Michael Malov
by
3.1k points

1 Answer

23 votes
23 votes

Answer:

Some languages used for DSLs include:

  • Web: HTML
  • Shell: sh, Bash, CSH, and the likes for *nix; MS-DOS, Windows Terminal, PowerShell for Windows
  • Markup languages: XML
  • Modeling: UML
  • Data management: SQL and its variants
  • Business rules: Drools
  • Hardware: Verilog, VHD
  • Build tools: Maven, Gradle
  • Numerical computation and simulation: MATLAB (commercial), GNU Octave, Scilab
  • Various types of parsers and generators: Lex, YACC, GNU Bison, ANTLR

DSLs are used for a specific context in a particular domain.

A domain-specific language (DSL) is a language meant for use in the context of a particular domain. A domain could be a business context (e.g., banking, insurance, etc.) or an application context (e.g., a web application, database, etc.) In contrast, a general-purpose language (GPL) can be used for a wide range of business problems and applications.

Step-by-step explanation:

A domain-specific language is created specifically to solve problems in a particular domain and is not intended to be able to solve problems outside of it (although that may be technically possible). In contrast, general-purpose languages are created to solve problems in many domains. The domain can also be a business area. Some examples of business areas include:

  • life insurance policies (developed internally by a large insurance enterprise)
  • combat simulation
  • salary calculation
  • billing

A domain-specific language is somewhere between a tiny programming language and a scripting language, and is often used in a way analogous to a programming library. The boundaries between these concepts are quite blurry, much like the boundary between scripting languages and general-purpose languages.

User Ofo
by
3.2k points