Marcus Breiing <firstname.lastname@example.org> wrote:
| email@example.com (Rob Warnock) writes:
| > I await serious comments/corrections with great interest.
| In another post, you quoted from the spec:
| For a language to be considered a subset, it must have the property
| that any valid program in that language has equivalent semantics
| and will run directly (with no extralingual pre-processing, and
| no special compatibility packages) in any conforming implementation
| of the full language.
| Now you write:
| > [I think ERROR, xxx-CASE, etc., can be defined in terms
| > of these plus the non-local transfers.]
| I'm sure they can. But because of the subset restriction, I think
| programs would have to be prohibited from adding their ERROR as
| COMMON-LISP:ERROR, because that wouldn't fly in the full language.
I think you have misunderstood my intent in describing a "minimal
subset of semantics". What I am looking at [which, granted, may be
somewhat different from what the original question was in this thread]
is the issue of what is a "minimal set of primitive semantics",
as it were, on top of which an *implementor* can build the full set
of Common Lisp semantics [or at least a consistent subset, but see
below on "subsets"]. So when I said "ERROR, xxx-CASE, etc., can be
defined in terms of these plus the non-local transfers", I was talking
about an *implementor* doing that defining, *not* the end user.
Sorry if that caused any confusion.
| On the other hand, I don't think you'd want everybody to have
| to provide their own PRIVATE:ERROR, nor introduce a pointless
| "looks-like-common-lisp-but-isn't" package. So you'd end up providing
| ERROR in the subset, anyway. Likewise, probably, with many other
| non-primitive but commonly used derivable operators.
See above. My goal is a small internal/implementor set of
semantics/special-forms/functions written in some other langauge
(probably C), with the *remainder* of the "Common Lisp subset"
written in terms of the "internal/implementor" set. So to a
*user* of the resulting CL subset, there would indeed be only
one ERROR provided as an external, namely, COMMON-LISP:ERROR.
[And, yes, COMMON-LISP:ERROR *might* use/call special-forms/functions
that are not in the COMMON-LISP package, but so what?!? All CL
implementations do that kind of thing. That doesn't imply they're
exported to the user.]
| I think this would strongly push an attempt to provide a "minimal"
| subset of ultimately all-powerful operators to end up rather
| non-minimal after all.
Well, just the needs of non-local transfers, basic conditions,
special variables, and arithmetic *already* take one into quite
"non-minimal" territory. But that's what you get with CL, which
is, after all, not Scheme.
| So I guess what I want to say is that a special purpose subset
| (for scripting, say), probably should be a proper subset not
| just syntactically, but semantically, too. "If you really need
| HANDLER-BIND, just use the FULL language."
What I've been discovering is that one can't *HAVE* a "proper
subset" without most of the semantics I called "minimal" in
my previous reply, since the very CLHS 1.7 "Language Subsets"
section we both have quoted from says:
...any valid program in that [the subset] language has
equivalent semantics... in any conforming implementation
of the full language.
That "equivalent semantics" constraint has been looming larger
and larger the more I look at the problem. E.g., it's why a
fixnum-only subset *cannot* be a "subset of ANSI Common Lisp".
(* 17 MOST-POSITIVE-FIXNUM) *will* overflow in a fixnum-only
subset and *won't* overflow in full ANSI Common Lisp, which is
*not* "equivalent semantics"! And so on & so on...
To say it another way: I'm now trying to find out whether or
not there can *exist* a "subset of ANSI Common Lisp" under the
criterion of CLHS 1.7 that is not (nearly) the whole language! ;-} ;-}
[And in a related but not identical question, find out what
a reasonable minimal set of primitives/semantics might be for
bootstrapping an ANSI CL (or a smaller subset, if a reasonable
one exists) from scratch.]
Rob Warnock <firstname.lastname@example.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607