[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Exact type
- To: Patrick H Dussud <DUSSUD%Jenner%csl.ti.com@RELAY.CS.NET>
- Subject: Re: Exact type
- From: kempf%hplabsz@hplabs.HP.COM
- Date: Wed, 30 Sep 87 14:16:36 MST
- Cc: common-lisp-object-system@SAIL.STANFORD.EDU
- In-reply-to: Your message of Tue, 29 Sep 87 16:12:46 -0500. <2768937166-6092662@Jenner>
> The user shouldn't expect
> that an argument will be exactly of this built-in type. On some
> machines, you cannot expect an cons cell argument to be always of the
> exact type CONS.
>
Now I think I understand. We're coming from two different directions,
as far as typing is concerned. Your direction seems to be the structural
equivalence one, that is, two data items are of the same exact type
if they have the same structure. My direction is operator equivalence,
two items have the same exact type if you can apply the same set of operators
to them. As to which is better, I think this may be a religious issue,
so I won't push on it. Both approaches have advantages and disadvantages,
but the advantages of the operator equivalence approach are mostly in
the ability to do compile time optimizations (which is what I had in
mind as a use for EXACT-TYPE) that are particularly important on
conventional machines. Since Common Lisp takes no stand on this issue,
it's open for implementors to do as they feel is best (hiding the
details under TYPEP and SUBTYPEP).
I'll rewrite the Cleanup Committee submission to reflect the restriction
you requested (unless I hear other objections), but I'd suggest we change
the name back to EXACT-CLASS, since the built-in types are no longer
covered.
jak
- References:
- Re: Exact type
- From: Patrick H Dussud <DUSSUD%Jenner%csl.ti.com@RELAY.CS.NET>