
Nikodemus Siivola <nikodemus@random-state.net> writes:
Christophe Rhodes <csr21@cantab.net> writes:
to the Test Case section and improving the references. I appreciate that the issue that CDR 3 describes is largely theoretical, but are there any comments from anyone out there? Getting any feedback before
At least LENGTH suffers from a similar problem: it is definied to work on "proper sequences", which are defined to be either vectors or proper lists.
Thanks for raising this; I hadn't spotted it, and it affects ELT too. However, the error terminology specified by ANSI is slightly different: where MAKE-SEQUENCE and friends has "must be signalled" if the specifier isn't a subtype of list or vector, LENGTH and ELT have "should be prepared to signal", which is close enough to a weasel word that I can live with it. Having said that, what I plan to do for the forthcoming extensible sequences, to maximize cultural compatibility with this clause is to define default methods on SEQUENCE for the generic versions of ELT, (SETF ELT) and LENGTH, which signal a type error. Then it is the user of the facility, by overriding those generic functions for his own sequence class, who explicitly requests the type-error from ELT / (SETF ELT) / LENGTH not to be signalled, and then probably even the language lawyers are happy. Cheers, Christophe