I've also noticed that the messages that come from botched macroexpansions are 
often not useful in that they contain no clues about the original source, and 
sometimes not even a useful reference to the original namespace.

I have a similar problem in Midje. When a macroexpansion blows up, I catch the 
exception and trim the stack trace to midje-specific frames. I display them to 
the user with the comment "This stack trace *might* help:". It almost never 
does.

Midje's design leads to nested macroexpansions. I've thought of capturing each 
stage and providing them in failure messages, so the user can (1) see the 
original form that provoked the problem, and (2) see which part of a larger 
form led to the problem. It would be nice if such history were somehow 
generally available.

I realize that I'm old-fashioned in my enthusiasm for macros and the use of 
dynamic scope. 

--------
Occasional consulting on programming technique
Contract programming in Ruby and Clojure
Latest book: /Functional Programming for the Object-Oriented Programmer/
https://leanpub.com/fp-oo

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Reply via email to