Marco Antoniotti
1/14/2016 8:24:00 AM
On Wednesday, January 13, 2016 at 10:58:44 PM UTC+1, tar...@google.com wrote:
> On Wednesday, January 13, 2016 at 6:08:57 AM UTC-8, Marco Antoniotti wrote:
>
> >... at least in CCL you get
> >
> > ? (subtypep (gensym) t)
> > T
> > T
> >
> > Which, IMHO, is wrong.
>
>
> Hmmm. Looks like someone may have tried to do an optimization when the second
> argument is T.
>
> But it seems like the Spec may not require anything different. The Exceptional
> Situations field says "None" and there isn't any text that seems to indicate
> that the arguments have to be valid type specifiers.
>
> I suppose one [not me] could argue that a symbol could name a not-yet-defined
> type and therefore the (gensym) of this mythical type would be subtype of T.
>
> Trying some more arguments, it seems that any symbol is considered a valid type
> specifier. (subtypep 3 t) generates an error.
I did a little more investigating and CMUCL and SBCL also exhibit the (IMHO) erroneous behavior. LW does (IMHO) TRT. I still have not reinstalled Allegro, ABCL, ECL etc on my new laptop so I cannot say anything about them.
I don't think there is much rationale to say that a symbol represents a yet-to-be defined type. Syntactically it is ok (I suppose), definitively not semantically.
Cheers
--
MA