Re:A hierarchy of software engineering discourse
by TeMPOraL on Thursday September 05, 2019 @12:18PM
(#20888195)
New DSLs/notations aren't conceptually different or more difficult than different libraries with differing APIs. In fact, each time you're coding to an API of a library, you are coding to a DSL - the API is the language. Writing real DSLs via code transformators/generators (e.g. macros in Lisp) just removes the noise caused by the mismatch between the API and the language syntax, making things potentially cleaner once you understand the API.
Documentation is still crucial, whether you're dealing with a library or a DSL.
Re:A hierarchy of software engineering discourse
by mikeurbach on Thursday September 05, 2019 @01:09PM
(#20888734)
For the last year or so, I've been fascinated by this concept, and I've been exploring language oriented programming with Racket. There was some discussion on this topic and the Beautiful Racket book here a while back [1]. That book is the best introduction I've found to the idea that you can build your notation to the problem you are solving.
Re: painting yourself into a corner, it is true that you can't retreat to Stack Overflow for help debugging your DSL, but the Racket documentation is some of the best I've seen, and common problems do pop up on SO.
Re:A hierarchy of software engineering discourse
by breck on Thursday September 05, 2019 @01:58PM
(#20889226)
You might be interested in our project (https://treenotation.org). Gone are all syntax characters like {}[](), which turn a 1D stream of tokens into an AST. Instead you simply write your source in 2-dimensional notation.
Makes it far easier to build new DSLs. (Evidence: see all the DSLs in GitHub.com/treenotation/jtree/langs)
Re:A hierarchy of software engineering discourse
by g8oz on Thursday September 05, 2019 @03:00PM
(#20889751)
FYI The only DSL with a readme is the poop one.
Re:A hierarchy of software engineering discourse
by breck on Thursday September 05, 2019 @05:18PM
(#20890716)
Whoops! Thanks for the reminder. We can get this fixed. https://github.com/treenotation/jtree/issues/63
Re:A hierarchy of software engineering discourse
by jrochkind1 on Thursday September 05, 2019 @07:07PM
(#20891449)
> In modern times, I can think of two languages that seem to have been built to provide solutions in specific problem domains:
The obvious one to me is `R`!
The idea of the language you're using to solve the problem being one of the things you're developing is an exciting and scary thought. Exciting because you can immediately implement any ideas you have into the new language, scary because stack overflow won't save you if you paint yourself into a corner.
In modern times, I can think of two languages that seem to have been built to provide solutions in specific problem domains: Go and Jai. Go is a fantastic language in certain problem domains, and I wish I had more excuses to use it. Jai isn't available publicly yet, but the creator of the language builds games for a living, has built (and shipped) multiple successful games, and he's building the language so that games can unchain themselves from C++.
I believe the article of the linked article is correct that this should be part of more engineers' toolkits. It may feel like it's easier to just use keep using C++ (or whatever) but what feels easy now doesn't protect you from the inevitable problems of the future.