emacs-devel
[Top][All Lists]
Advanced

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

Re: make-vector documentation is wrong


From: Daniel Colascione
Subject: Re: make-vector documentation is wrong
Date: Thu, 14 May 2020 19:59:44 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

On 5/14/20 7:46 PM, Paul Eggert wrote:
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.

Sure. We should make all of these things consistent. I'm not yet convinced that the special treatment of the zero-length object of any of these types actually helps though. Do we have any evidence that it does?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]