guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

accessing reader hash


From: thi
Subject: accessing reader hash
Date: Sun, 15 Oct 2000 13:31:02 -0700

i'd like to write a macro:

(defmacro understanding-c (c . body)
  `(let ((ignorance (get-hash-procedure c)))   ; todo
     (dynamic-wind
         (lambda () (read-hash-extend c specialized-c-reader))
         (lambda () ,@body)
         (lambda () (read-hash-extend c ignorance)))))

but `get-hash-procedure' is declared C static.  i was thinking...
instead of exposing this proc, maybe we could have `read-hash-extend'
return the current associated procedure (or #f if none).  at the moment
its return value is unspecified.

what do you think?  what other ways of localizing reader functionality
exist that i'm missing?  why is reader extension a global issue in the
first place -- does that make sense in light of lexical scoping?  what
are the proposed reader semantics for the module system?

(btw, i know dynamic-wind is not the proper approach, but you get the
picture i hope.  actually, another quesiton is: what is the most proper
approach?)

thanks,
thi



reply via email to

[Prev in Thread] Current Thread [Next in Thread]