[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Issue: ROOM-DEFAULT-ARGUMENT (Version 1)
- To: CL-Cleanup@SAIL.Stanford.EDU
- Subject: Issue: ROOM-DEFAULT-ARGUMENT (Version 1)
- From: Kent M Pitman <KMP@STONY-BROOK.SCRC.Symbolics.COM>
- Date: Mon, 12 Sep 88 18:05 EDT
Issue: ROOM-DEFAULT-ARGUMENT
References: ROOM (p442)
Category: ADDITION
Edit history: 12-Sep-88, Version 1 by Pitman
Status: For Internal Discussion
Problem Description:
Passing no argument to ROOM is not equivalent to any argument which
can be passed. This makes data-flow from another function which wants
to call ROOM inconvenient. Rather than simply passing a value through,
the correct calling sequence must be selected as well. For example,
one might have to do something like
(CASE FLAG
(:DEFAULT (ROOM))
((T NIL) (ROOM FLAG)))
where (ROOM FLAG) would suffice
Proposal (ROOM-DEFAULT-ARGUMENT:NEW-VALUE):
Specify that passing an argument of :DEFAULT is equivalent to passing
no argument to ROOM.
Test Case:
(ROOM :DEFAULT) is functionally equivalent to (ROOM).
Rationale:
Minimal change needed to get around the stated problem.
Allows ROOM to be describable without reference to supplied-p
information.
Current Practice:
Symbolics Genera defines ROOM using &REST and looks for NIL, (T), or (NIL).
[This reduces its ability to do compile-time number-of-argument checking.]
Some other implementations probably have a magic undocumented value
to avoid use of a SUPPLIED-P argument.
Cost to Implementors:
Probably it involves negligible resources to change this.
In most implementations, the resulting code would probably look better.
Cost to Users:
None. This change is upward compatible.
Cost of Non-Adoption:
The description of ROOM will look yucky in the emerging specification.
The source code for ROOM will look yucky.
[How's that for objective? -kmp]
Error checking in some implementations may be sub-optimal.
Benefits:
The description of ROOM in the now-being-written specification would
be less complicated.
Aesthetics:
This proposal would make a minor improvement in aesthetics.
Discussion:
This is obviously a low-priority issue, but would require such little
resources to fix that it seems worth doing.
Pitman supports this addition.
It's perhaps too bad that keywords like :SHORT, :MEDIUM, and :LONG
weren't chosen instead of T and NIL, since T and NIL have a bit of a
binary feel to them and it's hard to think of a good name for the
default case.