[Openmcl-devel] Side effects when redefining dispatching reader macro?

Robert Cram robert at robertcramconstruction.com
Thu Nov 12 15:11:05 PST 2015


Well above my (very low) LISP pay grade, but I note that slime was mentioned.  I had problems with named read-tables in one of the database libraries, in slime, found that read-table behavior was thread-specific, and that each statement executed at a separate prompt in slime was running in a separate thread.  Your last statement may know nothing about the read table environment set up in the prior one.  Combining into a function or progn or the like solved the problem for me.  Don’t know if that makes any sense or is helpful, but thought I’d throw it out there.

- Bob

Bob Cram
Robert Cram Construction
www.robertcramconstruction.com <http://www.robertcramconstruction.com/>
415-613-8319
robert at robertcramconstruction.com <mailto:robert at robertcramconstruction.com>
CA LIC 965300

> On Nov 12, 2015, at 2:27 PM, Gary Byers <gb at clozure.com> wrote:
> 
> 
> 
> On 11/12/2015 11:37 AM, Ron Garret wrote:
>> (MAKE-DISPATCH-MACRO-CHARACTER #\# NIL *readtable*)
> CLHS says (of MAKE-DISPATCH-MACRO-CHARACTER) that,
> 
> "Initially, every character <http://www.lispworks.com/documentation/lw50/CLHS/Body/26_glo_c.htm#character> in the dispatch table associated with the char has an associated function that signals an error of type <http://www.lispworks.com/documentation/lw50/CLHS/Body/26_glo_t.htm#type> reader-error <http://www.lispworks.com/documentation/lw50/CLHS/Body/e_rder_e.htm#reader-error>."
> 
> In the body of your message, you seemed to expect #' to have retained its original definition.
> 
> If the term "... makes char be a dispatching-macro-character ..." is read as "does nothing if the character is already defined as a dispatching-macro, else ...",
> your expectation is reasonable. I am probably more accustomed to the behavior that that you said that you get in 1.10, but both expectations seem reasonable.
> 
> Portable code could avoid the issue by calling GET-DISPATCH-MACRO-CHARACTER and only calling MAKE-DISPATCH-MACRO-CHARACTER if the character is not already defined as a dispatching macro.  I don't know what the library that the original poster mentioned does. or what version of that library they are using.
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> https://lists.clozure.com/mailman/listinfo/openmcl-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20151112/07bdaee4/attachment.htm>


More information about the Openmcl-devel mailing list