TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Reflections on the Lack of Adoption of Domain Specific Languages [pdf]

25 pointsby bnrover 4 years ago

10 comments

tincoover 4 years ago
Domain specific languages just didn&#x27;t settle at the level we expected. We thought they would be for really narrow domains, like a language for each kind of business logic. But instead the domains are more at the architecture level and some very broad purpose (i.e. HTML, SQL, etc).<p>At my company, we use Ruby for web backend and system administration. We use Typescript for web frontend. We use C# for process automation. We use Rust and C++ for real time performance (we&#x27;ve got an in house 3D engine), and a little bit of high performance processing. We use Python for data processing and machine learning.<p>That&#x27;s six &quot;general purpose&quot; languages, each applied to a specific domain, on six software developers, in three teams of two. Each happy with their choice of languages, effectively solving the business needs.<p>I think at some point in the past this situation was described as a nightmare. But I think at that point people thought developers were something you just opened a tin can of, and then applied to whatever problem you had. Nowadays we hire for a specific purpose (or at least I do). When I hire web dev experts, I expect them to be fluent in the industry standard web programming languages and platforms of our choice (i.e. for us it&#x27;d be Ruby and Typescript). When I hire 3D experts I expect them to be fluent in C++, and proficient in Rust (it&#x27;s the future). And obviously it&#x27;s Python for the data science types.<p>That&#x27;s a very clear world to me, and to be extra clear, I&#x27;m not saying any of the languages I mentioned are the best choice. As long as we operate within the lines the industries have drawn, you can draw upon the best libraries and ecosystems for your particular problem. I would never approve a 3D engine to be developed in Ruby, or a data science pipeline in Javascript. I&#x27;d rather have a Ruby developer learn some Python so they&#x27;d be able to work on the data science pipeline (disregarding their complaints about Python&#x27;s inelegance) than have them trying to kludge together subpar Ruby libraries.
notacowardover 4 years ago
It seems to me that the main reason DSLs aren&#x27;t more widely adopted is that any DSL will be unsupported by other tools developers consider more important. Your IDE won&#x27;t have syntax highlighting and auto completion for it, and a lot of developers nowadays seem crippled without those. Linters and semantic checkers won&#x27;t understand it. Nor will debuggers. There will be no mocking libraries or makefile rules for it. The list goes on and on.<p>These are problems that every new non-domain-specific language has to address. It&#x27;s quite a lot, and most of it is pretty tedious compared to designing the language itself. So even those who try to create DSLs often skip most of the &quot;extra&quot; bits, and other developers learn to hate DSLs.
评论 #25571023 未加载
评论 #25570894 未加载
评论 #25570161 未加载
评论 #25572611 未加载
评论 #25570705 未加载
anothernewdudeover 4 years ago
It is a bit telling those were the best reasons they could think of for lack of adoption. Just &quot;ignorance&quot;.<p>Not we thought that maybe specifying a DSL rather than a library would leave our users and clients in a state of having to banadage over the constraints of a DSL that doesn&#x27;t handle future use cases, like say dealing with control flow in a half-assed YAML based language, I&#x27;m looking at you Ansible.<p>I don&#x27;t want MAKE, or whatever DSL, I want to be able to drop into a real programming language when necessary. So libraries. Not frameworks, Not DSLs, libraries.<p>And thankfully, it seems the world agrees with me.
评论 #25570138 未加载
dstolaover 4 years ago
IMO a big reason why there is a decline in DSLs could be attributed to de-priotization of teaching compilers in Universities. There are certainly grad level courses, but (my university as an example) did not have an undergrad level compiler course, not even introduction to.<p>I think if you rekindle interests in compiler for people, you will simultaneously increase the likelihood of DSLs being used to solve problems.
bnrover 4 years ago
I&#x27;m thoroughly convinced that software engineering efficiency can be increased by at least one order of magnitude by letting domain experts and product owners directly modify the product through a well defined DSL.
评论 #25569000 未加载
评论 #25569303 未加载
评论 #25569875 未加载
diego_moitaover 4 years ago
Because when they are successful they&#x27;ll stop being &quot;Specific&quot;. It&#x27;s own success conspires against its nature.<p>Look at the history of Lua: it began as a language for config files, similar to makefiles, config.ini, xml or json.<p>But it solved this &quot;problem&quot; so well that people wanted it to become more powerful. And Lua did it without compromising too much it&#x27;s simplicity. Then it stopped being just a config language. Same goes with JavaScript: in the beginning it was just for small scripts on Webpages, today is much more than that.<p>People will want power and versatility in a language. And they&#x27;ll find that in Python, JavaScript, R or Lua. They&#x27;ll not find it in a DSL.
permille42over 4 years ago
This article misses the broader goal&#x2F;reason to use DSLs. That reason is metaprogramming.<p>DSLs are very powerful and extremely effective when they simplify how some specific task or sequence must be configured.<p>When you do something repeatedly in a programming language where it seems like there is a lot of copy&#x2F;paste, that is exactly when a DSL should be created and applied to avoid that sort of behavior.<p>In this sense, good DSLs are deeply related to the low-code movement.<p>When enough DSLs are made, need to write all logic in a general purpose programming language will be minimalized.<p>The place where this can most be seen currently is in process management systems and the DSLs used to configure them. Few are familiar with these because they are very expensive enterprise tools used to rapidly setup business processes and related interfaces.
throw_m239339over 4 years ago
SQL is pretty successful as a DSL which was intended for non programmers. XML,HTML,CSS are also successful. YAML&#x2F;JSON&#x2F;... based configurations are also used in a lot of apps.<p>And then there are LISP dialects, which in theory are the best tool to build any kind of DSL quickly, but I have never seen them used in production anywhere I worked, and it doesn&#x27;t look like end users would find it easy to work with.<p>How many of you had to develop a DSL from scratch for end users and domain experts? How did it go? Did end users actually ended up using it and were they satisfied with the syntax?
juancnover 4 years ago
They miss the main problem: tooling.<p>DSLs are nice, but you need to integrate them into a development workflow which means strong IDE support and build systems. Auto complete, testing, backward compatibility, etc.<p>If I normally have code in my IDE, where I right click on a test and choose run, everything is done for me, no fuss.<p>If I integrate a DSL, things stop working as normal. Unless it&#x27;s a widely supported DSL, such as regular expressions.
credit_guyover 4 years ago
Speaking of DSL&#x27;s, what is the status nowadays in creating DSL&#x27;s in Python?
评论 #25573636 未加载