News for hackers. Stuff that matters.
Re:Ask HN: Why don't we have a functional DSL for data+embed... by dandelion9 on Monday April 14, 2025 @07:34AM (#43680183)
Based on the averages, a DSL is going to suck and be a curse upon your future self/maintainers.

You provided a Clojure alternative, but without using the precise feature designed to alleviate this problem: transducers[0]. Transducers are the combination of functional composition and an indirection designed to decouple the data transformation pipeline from any specific source (e.g. async vs in-memory doesn't matter).

[0] https://clojure.org/reference/transducers

Re:Ask HN: Why don't we have a functional DSL for data+embed... by codingmoh on Tuesday April 15, 2025 @12:42PM (#43695336)
Yeah, I agree. DSLs tend to become a maintenance burden over time! transducers let you compose data transformations independently of the data source (in-memory, async, etc.), which sidesteps a lot of the pitfalls that a full DSL might introduce. Thanks so much for highlighting this!