[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Issue: MAKE-STRING-FILL-POINTER (Version 1)
- To: Moon@STONY-BROOK.SCRC.Symbolics.COM
- Subject: Issue: MAKE-STRING-FILL-POINTER (Version 1)
- From: Jon L White <jonl@lucid.com>
- Date: Thu, 10 Nov 88 15:13:01 PST
- Cc: CL-Cleanup@sail.stanford.edu
- In-reply-to: David A. Moon's message of Thu, 20 Oct 88 21:25 EDT <19881021012549.3.MOON@KENNETH-WILLIAMS.SCRC.Symbolics.COM>
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
string.
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 --