3 ms·
Monads enable DSLs exactly as well as macros. The bind operator is nothing else than a standard interpreter interface. In fact, monads have better afordance on
by marcosdumay 7y ago
Monads enable DSLs exactly as well as macros. The bind operator is nothing else than a standard interpreter interface.
In fact, monads have better afordance on domain specific semantics, while macros usually afford specific syntaxes. That makes macro based DSLs shallow and hard to understand when compared to the monad ones.