[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
PARSE-BODY
- To: cl-cleanup@sail.stanford.edu
- Subject: PARSE-BODY
- From: Jon L White <jonl@lucid.com>
- Date: Sat, 27 May 89 15:50:44 PDT
Guy Steele's "Clarifications" of 6-Dec-85 proposed adding a function
PARSE-BODY. After passage of the proposal that cancelled the use of
macroexpansions for declarations, interest in this function died out,
with the excuse given that it could now be written portably (since it
no longer had to deal with macroexpanding any body forms).
However, this excuse appears to be short-sighted, since the main
purpose of a standard is not kernelization, but to ensure a standard
way of doing things. Way back when, Lucid implemented PARSE-BODY exactly
according to Steele's description; but apparently not enough other
implementations did so. Consequently, PCL carries its own idiosyncratic
version called EXTRACT-DECLARATIONS. Below is a copy of a note sent
to the PCL mailing list musing about the matter. Despite the sender's
confusion on a minor matter, it does illustrate the value of agreeing
to a standard interface, regardless of how easy it might be to code it.
-- JonL --
Return-Path: <duff@unclejack.crd.ge.com>
Redistributed: commonloops.PA
Date: Thu, 25 May 89 13:57:34 EDT
From: duff@unclejack.crd.ge.com (David A Duff)
To: commonloops.PA@Xerox.COM
Subject: minor point about extract-declarations
Reply-To: duff@eraserhead.crd.ge.com
hello.
the macro EXTRACT-DECLARATIONS, defined in macros.lisp performs a function
that is very useful to me. looking at it more closely, however, revealed
either a discrepancy in the code or in my understanding of Steele's
description of common lisp.
the macro only returns at most one docstring and it assumes that the
docstring, if present will always be the first thing in the body. Steele
seems to indicate that multiple docstrings are allowable and that they can be
interspersed with the declarations.
has there been some sort of cleanup or clarification of Steele on this issue?
i personally, can't see much point in allowing docstrings to be interspersed
with declarations, and i don't know what the correct way would be to handle
more than one (i don't think Steele says anything about this).
Dave Duff GE Corporate Research and Development
duff@eraserhead.crd.ge.com Schenectady, NY 12309
- Follow-Ups:
- PARSE-BODY
- From: Kent M Pitman <KMP@STONY-BROOK.SCRC.Symbolics.COM>