3 ms·
> I'm surprised that you say an imperative language would give you an _easier_ embedding than using Haskell. I don't think your parent says this. The three co
by JadeNB 2y ago
> I'm surprised that you say an imperative language would give you an _easier_ embedding than using Haskell.
I don't think your parent says this. The three comparisons I found were:
> The fun thing is that this sounds like "just" a more type-safe version of the way DSLs are usually implemented in imperative languages, particularly scripting languages.
This sounds like saying that this trick is already common in imperative languages, not necessarily easier.
> The DSL in question tries to block that by preventing AST nodes from being converted to boolean, but it's not perfect. Haskell has an advantage there.
This explicitly gives the win to Haskell.
> So there's no trouble distinguishing between, e.g., calling some function bar() and then using the return value twice, versus calling bar() twice. No need to use a separate <- operator for assignments.
This one seems to give the win to imperative languages, but, as far as I can tell, just on the basis of syntax.