From: Paul F. D. <di...@dl...> - 2004-09-28 01:32:56
|
Christophe Rhodes wrote: > Paul Dietz <di...@dl...> writes: > > >>Christophe Rhodes <csr21 <at> cam.ac.uk> writes: >> >> >>>Well, under "System Class STRING", it is specified that >>>STRING means (VECTOR CHARACTER) when used as an argument to sequence >>>creating functions (such as CONCATENATE). So we special-case the >>>string symbol. >> >>This motivated me to write more tests for the sequence functions that >>take a <result-type> argument. They fail when the result type is >>(SIMPLE-STRING). >> >>* (make-sequence '(simple-string) 5 :initial-element #\X) >> >>debugger invoked on condition of type SIMPLE-TYPE-ERROR in thread 7294: >> (SIMPLE-ARRAY BASE-CHAR) is a bad type specifier for sequences. > > > Right. My argument is that this is conforming behaviour: the symbol > SIMPLE-STRING means (SIMPLE-ARRAY CHARACTER) when used for sequence > creating functions, as per the CLHS "Type SIMPLE-STRING" page; no such > behaviour is implied anywhere for the Compound Type Specifier > (SIMPLE-STRING). I'll argue that this is contradicted by this statement (on the page for SIMPLE-STRING): When used as a type specifier for object creation, simple-string means (simple-array character (size)). Note the 'size'. This means it's supposed to be sensible to use (simple-string *) as a type specifier in object creation, where * is the size. According to 4.2.3, (simple-string) is just an abbreviation for that. Paul |