Hacker News new | ask | show | jobs
by fn-mote 391 days ago
I used to feel that way. I’m still not a convert, but now I’ve seen a lot more complexity papered over by a nice DSL.

Standard math syntax is a DSL. I understand math a lot more quickly than I understand the same thing written in 20 lines of code.

I think the language we use to express ourselves influence the quality of the product. If your language encapsulates complexity, then you can build more complicated things.

I’m not arguing in favor of specific (“pointless”) DSLs, but there’s a nice paper about making a video editing language in Racket [1] that makes a DSL seem pretty convincing.

[1]: https://www2.ccs.neu.edu/racket/pubs/icfp17-acf.pdf

1 comments

The protocol buffer / grpc definition language is another great example of where a DSL can shine. Especially if you compare it to efforts to accomplish basically the same task using pre-existing languages, such as OpenAPI (JSON) and WCF (XML).
Captain Pedant here, but OpenAPI also accepts yaml which suffers from a ton less { and "

gRPC and I are not friends and I've thankfully never needed to interact with WCF