Matthias, > It’s quite doable but I think this misses the point
I see that I haven't made my point clearly enough (if at all). I certainly don't want to go back to unhygienic macros without error checking. What I do want to go back to is doing simple manipulations of syntax objects using familiar list functions. A simple example I encountered recently is probably the best illustration. Somewhere in a syntax class, I had a syntax object which was checked to be a list with at least three elements. I needed to remove the first element and add it in front of the others. On a plain list, I could do this half asleep. But with the list wrapped in a syntax object, even after considerable thought I am not sure what the best approach would be. Unwrap (syntax->datum), apply list functions, rewrap? The resulting code is not very readable, the wrapping stuff being much more visible than the code that does the real work. Pattern match against (a b c ...)? OK for this particular case, but not for the next case I knew I would have to deal with. Read through the extensive documentation of syntax-parse, hoping to find the perfect solution? Not a very exciting prospect. Note that hygiene is not an issue here. In 80% of my macro code, hygiene is not an issue, nor is error checking. For the other 20%, syntax-parse is just fine. > I think what we’re really seeing here is that backwards compatibility > sometimes smothers elegant solutions. I firmly believe that in this > case we should simply throw out syntax-rules and syntax-case A very good idea. At least throw it out from the tutorials and all example code. Point people to syntax-parse right from the start. Keep syntax-case to avoid breaking code, but don't advertise it any more. > Other Matthew has written a book from a particular angle. It’s > beautiful but clearly leaves an unsatisfied need behind. I'd say the unsatisfied need is in between the tutorial for beginners and the reference documentation. Something that helps finding a good solution for a specific problem, for someone who knows the basics of syntax-parse. It could be a curated collection of case studies. Konrad. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.