3 ms·
I hope that the macro system he's working on bares some fruit. Personally, I've always liked explicit-renaming macros, as they provide you the benefits of both
by apgwoz 15y ago
I hope that the macro system he's working on bares some fruit. Personally, I've always liked explicit-renaming macros, as they provide you the benefits of both hygiene and (almost) the convenience of defmacro. But, the pattern language of syntax-rules makes it much easier to maintain macros, as you can actually see what it is you're matching without first interpreting the series of list operations... Hopefully the two will be married in some glorious way!
- jlongster 15y agoExplicit renaming also gets annoying because it's done properly you need to rename everything, even basic forms like let, if, cond, etc.
- Arelius 15y agoAnyone ever tried something of a explicit un-renaming macro?
- apgwoz 15y agoRight, and that's the point. Though, I suppose it'd be easy enough to create a code walker which renamed everything unless the symbol started with % or something. That, in my opinion is sort of the beauty of Clojure's macro system. By default, all symbols referred to are expanded to there FQN unless of course you use unquote. My guess is that Byrd's problem with that is that it's not really a hygiene solution so much as it is a system which takes full advantage of 2 things--Clojure vars are immutable and namespaces are unique.
- Arelius 15y agoYes, trying to do anything complicated is always very painful in syntax-rules, and every once in a while, you really do want unhygienic macros. Explicit rename is much simpler to understand, and more powerful. The only problem is that it's easier to make a macro unhygienic. But I figure that if you are already programming in a lisp, you can handle not having the language hold your hand through hygiene, it doesn't anywhere else.