The Two-Layer Domain Specificity Hypothesis

We have heard that Excel or SQL are domain-specific languages. They are domain-specific in one sense, but not so in another. Excel provides a specific grid-based model to express computations and SQL offers specific operations to operate on tables. In this technical sense both languages are more specific than general-purpose languages. However, both languages are generic in the sense that they can be used for many different application domains, such as accounting spreadsheets or personnel databases. In this sense, Excel and SQL are not domain specific languages.

Domain-specific languages for those domains can well be implemented using Excel and SQL, respectively, but Excel and SQL are, of course, not languages that are specific to these domains only. So we can distinguish between two different notions of domain specificity: (1) Domain-specificity in the technical sense, and (2) domain-specificity in the application sense. Excel and SQL are domain-specific in the technical sense, but they are not domain-specific in the application sense. They might, however, be called domain-suitable for specific applications, that is, Excel is domain suitable for accounting applications, and SQL is domain suitable for personnel databases.


3 comments:

  1. In other parts of computing (I hesitate to use the word "domain"), people make the distinction between "vertical" (within a business domain, such as telecomms) and "horizontal" (across business domains) foci. I think this is a better way of putting it than to talk about "layers": the area of applicability of a language is multi-dimensional, and a language may be specialised to particular hyperplanes in this multi-dimensional space.

    ReplyDelete
  2. I really think this confusion (if you can call it that) arises from the fact that the word "domain" is overloaded.

    Generally, when speaking about domain-specific languages we are referring to the "problem domain", that is, the set of problems that we want to apply our language to. However, I think the argument that Excel and SQL are domain-specific makes sense if we instead map the word domain to "implementation domain" or "target domain" (perhaps there is a better term?).

    So, Excel is a language specialized for the implementation domain of grid-structured data, and SQL is a language specialized for the implementation domain of database tables.

    ReplyDelete
  3. Another instance of termoinology rot. The term domain knowledge should remain for specific or application specific or application area specific knowledge. To use "domain-specific" as a way of indicating a particular programming or specification style is just wrong - it confuses the means of DSL with their purpose.

    ReplyDelete

Note: Only a member of this blog may post a comment.