|
|
|
|
|
by sklogic
3693 days ago
|
|
(cannot answer there too, weird...) No, I conculded that you have no idea how to implement macro-based DSLs from your remarks about composability and debugging. You cannot be so out of touch and still know something about the macros. And, no, you did not point to a viable alternative. Monadic interpreters are complex, convoluted and very inefficient. This is an objective fact, not a matter of a taste. Do not agree? Show me a definitive example of such a DSL and I will demonstrate how much simpler a macro-based version is. |
|
Interpreters are inherently bad and there is almost nothing you can do about it. The only sane way of keeping an interpreter complexity under control is to use a single common trivial VM interpreter, write it once, never touch it again, and lower all your monadic DSL ASTs down to it.
Which makes this solution quite similar to the macro-based one (it would actually reek of Greenspun Tenth), but still much less efficient.