News for hackers. Stuff that matters.
Re:Red Programming Language by drob518 on Wednesday May 21, 2025 @09:02AM (#44051015)
It has been interesting to watch the Clojure community’s take on DSLs over time. Clojure is a Lisp, and Lisps are notorious for inventing DSLs, particularly after PG’s various papers promoted that as a superpower of sorts. Clojure has gone the other direction and, while it supports macros, it generally discourages their use unless you’ve tried everything else first. But it still encourages DSLs built from the native Clojure data structures. So, for instance Hiccup for HTML generation.
Re:Red Programming Language by jolt42 on Wednesday May 21, 2025 @09:44AM (#44051396)
The discouragement of macros I think is a knee-jerk reaction. Build around data structures and functions first, and then use the thinnest macros around that can be quite maintainable.