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


This proposal isn't merely an ADDITION -- it is an incompatible CHANGE,
since CLtL explicitly states that the output of MAKE-STRING is a simple

If we are to give up that semantics, then a separate function for 
MAKE-STRING makes sense only in two circumstances:
  (1) when STRINGs are fundamentally different from ARRAYS; or
  (2) when it is merely a "shorthand" syntax.

Since there has been no attempt to retrench strings away from their 
underlying implementation as arrays, then I suggest we either leave 
MAKE-STRING alone, or complete the (incompatible) "shorthand" extension
as follows:

  (defun make-string (size &key :initial-element :initial-contents
                                :adjustable  	 :fill-pointer 
                                :displaced-to    :displaced-index-offset)
    (check-type size integer)
    (make-array size :element-type           'string-char 
                     :initial-element        initial-element 
                     :initial-contents       initial-contents
                     :adjustable             adjustable 
                     :fill-pointer           fill-pointer
                     :displaced-to           displaced-to
                     :displaced-index-offset displaced-index-offset))

[When applicable, of course, compiler optimizers could convert MAKE-STRING 
calls into something more efficient.]

-- JonL --