[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Issue: HASH-TABLE-PACKAGE-GENERATORS (version 4)
- To: Jon L White <jonl@lucid.com>
- Subject: Issue: HASH-TABLE-PACKAGE-GENERATORS (version 4)
- From: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>
- Date: Thu, 10 Nov 88 15:21 EST
- Cc: cl-cleanup@sail.stanford.edu
- In-reply-to: <8811101832.AA05895@bhopal>
I approve the WITH-HASH-TABLE-ITERATOR portion of
HASH-TABLE-PACKAGE-GENERATORS:ADD-WITH-WRAPPER.
I have two problems with WITH-PACKAGE-ITERATOR. First, you use the
undefined phrase "available in the indicated package" a few times. I
think you mean "accessible in the indicated package" (defined on CLtL
p.172). The more important problem is that I think the syntactic
problem noted in the discussion section makes WITH-PACKAGE-ITERATOR
unacceptable. I don't like having a required argument that is ignored,
and I don't like having those two unspecified cases: either the meaning
should be specified or they should signal an error.
I have two suggested alternatives that I think solve this. Either of
them would be acceptable to me. The second is simpler than the first so
I mildly prefer it. If you like I can edit up an alternative proposal,
but I thought I would start by just presenting alternatives to this one
small piece of your proposal.
Alternative syntax #1: In place of
WITH-PACKAGE-ITERATOR ((<next-fn> <package> [Macro]
&key external internal inherited)
&body body)
let's use the syntax
WITH-PACKAGE-ITERATOR ((<next-fn> [Macro]
&optional <package>
&rest symbol-types)
&body body)
The symbol-types arguments are symbols from the set {:INTERNAL, :EXTERNAL,
:INHERITED}. Their order does not matter.
(WITH-PACKAGE-ITERATOR (next) body) is DO-ALL-SYMBOLS.
(WITH-PACKAGE-ITERATOR (next pkg) body) signals an error for invalid syntax.
(WITH-PACKAGE-ITERATOR (next pkg :EXTERNAL) body) is DO-EXTERNAL-SYMBOLS
(WITH-PACKAGE-ITERATOR (next pkg :INTERNAL :EXTERNAL :INHERITED) body) is DO-SYMBOLS
etc. for the other five cases.
Alternative syntax #2: Use the syntax
WITH-PACKAGE-ITERATOR ((<next-fn> [Macro]
&optional <package>)
&body body)
If <package> is supplied, this is DO-SYMBOLS, otherwise it is DO-ALL-SYMBOLS.
The third value returned by <next-fn> can be used to filter out unwanted symbols
when doing such operations as DO-EXTERNAL-SYMBOLS.