3 ms·
> Implementing small (domain specific) languages is fun. This, from the conclusion, is something I totally agree. However fun isn't all there is to production
by kccqzy 7y ago
> Implementing small (domain specific) languages is fun.
This, from the conclusion, is something I totally agree. However fun isn't all there is to production systems. Writing so many little languages just make the program overall more complicated with increased cognitive burdens. Writing new languages must generally be carefully weighed against the alternative of picking one single language with good abstraction power for almost everything.
- deleted 7y ago[deleted]
- maaaats 7y agoSome languages have constructs that make it possible to make pseudo-DSLs in them. For instance function with receivers in Kotlin. That's a nice tradeoff I think.
- chrisseaton 7y agoOften called internal DSLs.
- bigwavedave 7y agoI once took over a project from an engineer who'd been let go, and after I saw the mess of a DSL he'd made and used in 100% of his contributions to the project I understood why. We called it our infernal DSL.
- goatinaboat 7y agoFortunately, in the near future, all programming will be done in YAML. Apart from OPA obviously. /s
- TeMPOraL 7y agoC++ or JavaScript is a "language", but so is the API to that library you're currently using in your project. Different ends of the language spectrum. The article is about Clojure, a Lisp, and Lisps are good at giving you access to the entire spectrum. When you hear a Lisper talking about "writing a language", half of the time it's just couple dozen lines of code defining a macro that makes some code much more readable and expressive. Then there are times when "a language" is an extensible pattern-matching engine or otherwise half of Prolog, but those cases are usually handled by someone who has a real need for it and later publishes it as a library - and you're only happy you can now use half of Prolog without actually adding a Prolog to your codebase, with all the devops headaches this would create.
- kccqzy 7y agoThat's what I meant by "language with good abstraction power." Lisps with macros, or Haskell with its incredibly flexible do-notation are examples of languages that allow you to reuse the host language parser and compiler. It takes a lot of fun out of actually developing a language, but nevertheless more practical.