[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Issue: SYMBOL-MACROLET-DECLARE (version 1)
- To: CL-Cleanup@SAIL.STANFORD.EDU
- Subject: Issue: SYMBOL-MACROLET-DECLARE (version 1)
- From: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>
- Date: Mon, 12 Sep 88 20:42 EDT
- Cc: Gregor.pa@Xerox.COM, David N Gray <Gray@DSG.csc.ti.com>, Patrick Dussud <dussud%edsel@labrea.stanford.edu>, kempf@Sun.COM, Glenn Andrew Kramer <GAK@SPAR-20.SPAR.SLB.COM>, common-lisp-object-system@SAIL.STANFORD.EDU, Jeffrey Piazza <piazza%lisp.DEC@decwrl.dec.com>
- In-reply-to: <19880802205147.3.GREGOR@PORTNOY.parc.xerox.com>, <2795614606-3753982@Kelvin>, <8808031719.AA12130@rainbow-warrior.lucid.com>, <8808031847.AA18770@suntana.sun.com>, <2795636967-5097451@Kelvin>, <GAK.12419581321.BABYL@SPAR-20.SPAR.SLB.COM>, <8808041525.AA20536@suntana.sun.com>, <2795711083-4281424@Kelvin>, <19880808171852.6.GREGOR@PORTNOY.parc.xerox.com>, <8808111506.AA11766@suntana.sun.com>
- Line-fold: No
Issue: SYMBOL-MACROLET-DECLARE
References: SYMBOL-MACROLET (88-002R page 2-81)
WITH-ACCESSORS (88-002R page 2-88)
WITH-SLOTS (88-002R page 2-92)
Category: ADDITION
Edit history: Version 1, 12-Sep-88, Moon
Problem description:
It would be both natural and nice to be able to write
(with-slots (rho theta) point
(declare (single-float rho theta))
...computation...)
Proposal (SYMBOL-MACROLET-DECLARE:ALLOW):
Allow declarations at the head of the body of SYMBOL-MACROLET, and hence
in WITH-ACCESSORS and WITH-SLOTS. Exactly the same declarations are
allowed as for LET, with one exception: SYMBOL-MACROLET signals an error
if a SPECIAL declaration names one of the symbols being defined as a
symbol-macrolet. A type declaration of one of these symbols is equivalent
to wrapping a THE expression around the expansion of that symbol.
Test Cases/Examples:
See problem description.
Rationale:
If SYMBOL-MACROLET is intended to resemble LET in syntax, it ought to
allow declarations. When writing a SYMBOL-MACROLET directly, the user
could just as easily write a THE expression instead of a type
declaration. However, when invoking a macro such as WITH-SLOTS that
expands into SYMBOL-MACROLET, the user does not have this option since
the expansion is not supplied explicitly by the user.
Current practice:
SYMBOL-MACROLET was only tentatively added to Common Lisp 3 months ago.
Cost to Implementors:
Less than one man-hour.
Cost to Users:
None.
Cost of non-adoption:
Minor wart in the language.
Benefits:
More consistent language definition.
Esthetics:
More consistent language definition.
Discussion:
None.