Opened 10 years ago

Closed 10 years ago

#568 closed defect (fixed)

#_ should not be in the standard readtable

Reported by: heller Owned by: gb
Priority: normal Milestone:
Component: ANSI CL Compliance Version: trunk
Keywords: Cc:

Description

I'm not a language lawyer but it doesn't seem right that #_ is in the standard readtable:

Welcome to Clozure Common Lisp Version 1.4-dev-r12409M-trunk  (Linuxx8632)!
? (setq *readtable* (copy-readtable nil))
#<readtable #x14AD5676>
? (#_tmpnam (ccl:%null-ptr))
#<A Foreign Pointer #xB7F7A08C>
?

Change History (6)

comment:1 Changed 10 years ago by rme

  • Resolution set to invalid
  • Status changed from new to closed

The spec includes a table that lists all the reader macros associated with the # character in the standard syntax:

http://www.lispworks.com/documentation/lw50/CLHS/Body/02_dh.htm

Numerous combinations in this table are marked as "undefined." Of these, the spec says,

The combinations marked by an asterisk (*) are explicitly reserved to the user. No conforming implementation defines them.

This seems to me to say that a conforming implementation may define combinations not marked with an asterisk. #_ is not one of the combinations explicitly reserved for the user, so I believe that it's acceptable for ccl to define it.

comment:2 Changed 10 years ago by gb

  • Resolution invalid deleted
  • Status changed from closed to reopened

The spec talks about there being 3 readtables (at least conceptually): the "current", "standard', and 'initial' readtable.

The initial readtable's contents are implementation-dependent; it at least defines standard CL syntax and may additionally define implementation- dependent things (like #_, etc.) as long as those implemenation-dependent things don't use macro characters that're reserved for the user.

What the standard readtable contains is a little murkier to me because of some unfortunate wording, but a reasonable reading is that it contains all of the standard CL things and no implementation-defined syntax extensions, so that (COPY-READTABLE NIL) returns a "vanilla" CL readtable. That's useful, and has no effect on much of anything else, and it -may- be what the spec is trying to say ...

comment:3 Changed 10 years ago by heller

It would probably have an effect on WITH-STANDARD-IO-SYNTAX.

comment:4 Changed 10 years ago by rme

(from r12497) Try to distinguish between initial/standard readtables better

comment:5 Changed 10 years ago by rme

(In [12889]) In WITH-STANDARD-IO-SYNTAX, bind *READTABLE* to the standard readtable, now that we make a distinction between the standard readtable and the initial readtable. (see ticket:568)

comment:6 Changed 10 years ago by rme

  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.