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

Re: (SYMBOL? #t) ==> ?

Mind you, I'm not sure that I like Andy's proposal, but I thought that I should
correct one of Jon's statements.

Jon says: ``As I understand your message, you are saying that a Scheme
implementation in which, say, ALL type predicates returned #T ALWAYS, would be a
correct one.  For example, it could be the case that (symbol? '(a b)) => #t and
(pair? 'a) => #t.  (I guess it would also have to have no type errors, but
that's a detail.)  It seems to me that this makes the type predicates nearly

The type predicates are not useless in general, their use is simply unnecessary
in *that* implementation of Scheme.  They are still necessary for the writing of
portable code.  Some implementations, such as Cedar Scheme so long as I'm
involved with it, would have all of the disjointness properties you could ask
for and so code written to run under it would need all of those predicates.

Michael Plass here pointed out that one benefit of allowing the various types to
share members is that a very small conforming implementation could be written in
which, for example, all of lists, vectors and strings were implemented as cons
cells (vectors and strings would, of course, use some special marker in the
first CAR).  I'm not particularly impressed with this argument, but it does seem
to be valid.