[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: make-vector documentation is wrong
From: |
Paul Eggert |
Subject: |
Re: make-vector documentation is wrong |
Date: |
Thu, 14 May 2020 19:46:09 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 |
On 5/14/20 6:36 PM, Daniel Colascione wrote:
> We should fix either the docstring or the behavior
> of make-vector, and the latter seems better to me because it reduces the
> number
> of special cases in the system.
That depends on how one counts special cases.
(make-string 0 0), (make-list 0 0), (vector), and (list) all have the property
that (make-vector 0 0) does - that is, each call returns the same empty object
each time. I imagine that make-vector was implemented to be consistent with the
other functions - at least, this behavior appears to be a conscious decision
rather than accidental. So it may make sense to change these functions'
documentation instead of their implementation's longstanding behavior.