On Mar 29, 2011, at 6:08 PM, Bob Kerns wrote:
While I can see advantages to having a form record where it came from, as you guys are describing, there's also a huge disadvantage -- the need to actually expand (and possibly evaluate) that macro, before being able to use meta-dot.
I use tag files. Tag files are good.
Even better, a lot better, is id-utils mkid' m-x gid; I recommend it - even if it has some rough edges.
Of course, no amount of lexical indexing can discover the definition of cool-widget that arose from a define-toy-box form.
On Mar 28, 2011, at 5:59 PM, Alessio Stalla wrote:
I think it would be best done by implementers (a CDR?) rather than
being a library, since it interferes quite deeply with the reader.
I suspect that most implementations have this functionality. In ccl:record-source-file for example; and in LispWorks the subsystem is almost entirely documented:
Conium is sweet. That helps some queries to the data stored about definitional homes, but it doesn't help with making entries into that data store.
----
I seem to recall that the Lisp Machine or the Symbolics also had something analogous to LispWork's dspecs; but i couldn't fine it with a minute or two of looking.
I was sad to see that some of the implementations lack affordances for extending the kinds of things defined, e.g. adding widgets would be a pain.
The LispWorks documentation is full of interest. They take a run at providing both containment (things defined inside of other things) as well as single things defined by the union of many forms (e.g. generic methods and their individual methods).
---
In addition to the index-my-sources and the collect-assertions-about-definition approaches there is another possible tack. If your compiler writer is staying up late he may have provided very fastidious mappings back to the source file for all the code he's generating. People do that for debugging, code coverage, and even implementing unwind cleanups ... i guess that data might also be leveraged for this. It's not obviously how though.
- ben
- ben