[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Issue: LIST-TYPE-SPECIFIER (Version 1)



Count me as wanting the LIST type specifier to treat its arguments like
the ARRAY type specifier.

Although it's true the ARRAY type specifier is a mess, it would only
be emphasized by something so syntactically similar as this behaving so
radically differently.

Strange as it sounds, I might be susceptible to a proposal for (LIST-OF
FIXNUM FLOAT) to mean what (LIST FIXNUM FLOAT) is proposed to mean and
vice versa. I don't think there's anything about LIST-OF which really
forces the suggested interpretation. That way, the same functionality
would be available and things would be more consistent. ... or maybe
LIST-CONTAINING.

If this feature of enumerated types is going to be added for lists, though,
perhaps it would be useful for vectors and arrays, too. Just as we can
specify array values using #(...) and #A notation, maybe we should be able
to type them that way as well. There are two possible approaches:
 (LIST-CONTAINING   (FIXNUM FLOAT))
 (VECTOR-CONTAINING (FIXNUM SYMBOL))
 (ARRAY-CONTAINING  ((FIXNUM FLOAT) (T SYMBOL)))
or
 (CONTAINER (FIXNUM FLOAT))
 (CONTAINER #(FIXNUM SYMBOL))
 (CONTAINER #2A((FIXNUM FLOAT) (T SYMBOL)))

Unfortunately, this whole topic is so hard to think about, I don't claim
I can keep it all in my head. I might have other criticisms if I saw a
proposal drafted that way ... but I'd think we were making progress.