HACKER Q&A
📣 breck

What new DSLs would you like to see?


Imagine there was a new way to rapidly build fantastic new domain specific languages.

What problems do you think could be solved with languages that "just work"?


  👤 qppo Accepted Answer ✓
I think the answer is to look at things that can't be done by executing code from a library. In other words, think about something you can compile that isn't executable code.

Some examples: hardware description languages (VHDL, Chisel), human readable graphics languages (shaders, SVG), languages for describing music or instruments (super collider, SOUL, Max/MSP, Pure Data), other creative coding, generative art, etc. Essentially think about all the things that programs arent, and think of how a DSL can represent them - be it abstract information like art, physical things, or other things not readily represent able as digital data.

But to the first part of your question: it's not hard to make a DSL. It's hard to make one that people will use. The hardest problem in developing one is dogfooding it, you need users from Day 1 to give feedback on what works and what doesn't make sense. Another way to think of it is that the technical problems of DSL development are straightforward, the social problem of making one that's useful isn't.


👤 PaulHoule
Better query languages.

Right now I am writing something in Java that embeds Java-in-Java to write Java expression trees such that you can do LISPy metaprogramming... kinda like

   add(callSqrt(X),Y)
where X and Y are numerically typed expressions; you could either evaluate this interpretively like a LISP S-Expression or write it into source code and compile it. I've been able to unerase the types in much of the Java standard library in such a way that the expression trees are type safe and your IDE keeps track of the unerasure.

👤 erlich
I don’t think DSLs are good. Just use a nice Typescript api.