3 ms·
"How are "little languages" different from a bunch of functionality wrapped into a library/module?" This is called a shallow embedding in the Haskell world. D
by hackandthink 4y ago
"How are "little languages" different from a bunch of functionality wrapped into a library/module?"
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.
http://www.cse.chalmers.se/~josefs/publications/TFP12.pdf http://www.cse.chalmers.se/~josefs/publications/TFP12.pdf
https://wiki.haskell.org/Embedded_domain_specific_language https://wiki.haskell.org/Embedded_domain_specific_language