3 ms·
One thing to note is that you're using the macro or lambda to delay evaluation. In a lazy-by-default language, that's unnecessary (which is a part of why macro
by dllthomas 12y ago
One thing to note is that you're using the macro or lambda to delay evaluation. In a lazy-by-default language, that's unnecessary (which is a part of why macros are less useful in Haskell).
- eru 12y agoTrue. They are still useful enough for Template Haskell to exist.
- dllthomas 12y agoFor sure.
- wtetzner 12y agoThere's a class of things that don't require macros in Haskell, but I don't think that means macros are less useful in Haskell. There are plenty of things you might want them for, like generating new definitions.
- dllthomas 12y agoI certainly didn't want to imply that macros were not useful in Haskell. Just that there's good reasons you see them less often. Depriving a Haskell programmer of the ability to define new macros is going to hurt a whole lot less than depriving a Lisp programmer of the same.