[pro] definitional home

Ben Hyde bhyde at pobox.com
Mon Mar 28 19:10:35 UTC 2011


On Mar 28, 2011, at 11:14 AM, Mark H. David wrote:
> Can you explain a bit what you mean by this?


My example.  Say I have a macro for defining widgets and I use it I  
define cool-widget on line N of file foo.lisp like so:

    (define-widget cool-widget ...)

In the wonderful world which is my imagination I should be able to  
meta-dot the symbol cool-widget
and shortly there after find my self visiting line N of foo.lisp.

This presumes that each implementation supports the concept of  
definition homes for - a mapping from
keys of some sort (typically a symbol) to source location(s).   The  
author of define-widget would add
entries to that mapping.  The IDE (slime say) would query that mapping.

The author of define-widget might write something like so:

(defmacro define-widget (name ...)
     ...
     `(progn
          (take-note-of-definitional-home ,name ... :widget ...)
          ...))

The kind implementor of the 'implementation independent library that  
abstracts out the
recording of the "definitional home"' would know how to map the  
arguments to take-note-of-definitional-home
into something that actually adds/revises an entry into the  
implemenation's mapping.

It would be a wonderful world, yes it would.

  - ben





More information about the pro mailing list