Domain-specific languages

A language developed for expressing solutions to problems that are specific to a domain such as finance, payroll, electronic circuit design, parser generators, input validations, and so on is called a domain-specific language (DSL). Two common examples that are familiar to most programmers are Structured Query Language (SQL) and regular expression (RE). If we were to write imperative code for retrieving data from a database, it would have been a difficult task and error prone. SQL gives you a declarative language to achieve the same objective, and it has solid mathematical foundations. While searching strings, RE helps us to give complicated patterns to match against a string. It helps to avoid writing tedious logic for ...

Get .NET Design Patterns now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.