3 ms·
Just minor nitpick: "lisp style macros" are not necessarily hygienic either, which is why you need (gensym). Not in Scheme, though. "iirc you can just use one
by klibertp 14y ago
Just minor nitpick: "lisp style macros" are not necessarily hygienic either, which is why you need (gensym). Not in Scheme, though.
"iirc you can just use one per module"
I happen to use erlando[1] often (it's fun!) and I use both do and cut transforms all the time. So no, there is no limit to how many parse transforms you can use in one module.
It's true, however, that writing them is a pain, which is why I never bothered to write one (just take a look at how the 'do' is implemented) - but I just accepted this as inevitable cost of not using s-exps as a language syntax. I'll take a look at how Elixir does it, I'd be very positively surprised if it manages to get real macros convenient in non-s-exp language :)
[1] https://github.com/rabbitmq/erlando https://github.com/rabbitmq/erlando