by ssivark · 4y ago · 0 comments
I would imagine that most of the value comes from being able to "refactor" thought patterns to match the best way to cleave the domain into composable concepts -- and it seems like we do this all the time (and in all programming languages?).
This is called a shallow embedding in the Haskell world.
Deep Embedding is more like writing a full blown interpreter.
Then there is tagless final (Oleg Kiselyov) - it feels shallow but is more flexible as simple library functions and it is optimisable like deep embedded DSLs.
With a library you just need to learn the new semantics. I much prefer this to a DSL.
Plus a library has all the debug tools the language has. DSLs usually don't have any debug tools except for printing when you are lucky