From: Yuri Khan <yuri.v.khan@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Why is `pop' not named `npop'?
Date: Wed, 17 Jan 2024 18:13:11 +0700 [thread overview]
Message-ID: <CAP_d_8W2RRgQyEKZXqTztqU0RrjBcbiYYDR2b=md5dmmQyfVZA@mail.gmail.com> (raw)
In-Reply-To: <87ply0n2qj.fsf@dataswamp.org>
On Wed, 17 Jan 2024 at 17:53, Emanuel Berg <incal@dataswamp.org> wrote:
> >> the `pop' macro is destructive. Why isn't it called `npop'
> >> then? [...]
> > but there is also no need for a non-destructive pop since we
> > already have car.
>
> But shouldn't `pop' be called "ncar" then?
The ‘n’ in ‘nreverse’ and other destructive functions is said to mean
‘non-consing’, that is, they won’t allocate new cons cells but rather
modify what is already there to achieve the desired structure. The
focus is not on destructiveness, it is on the lack of pressure on the
allocator.
‘car’ is already as non-consing as it gets.
prev parent reply other threads:[~2024-01-17 11:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-16 4:28 Why is `pop' not named `npop'? mbork
2024-01-16 5:07 ` Po Lu
2024-01-16 6:25 ` Philip Kaludercic
2024-01-17 1:54 ` Emanuel Berg
2024-01-17 11:13 ` Yuri Khan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAP_d_8W2RRgQyEKZXqTztqU0RrjBcbiYYDR2b=md5dmmQyfVZA@mail.gmail.com' \
--to=yuri.v.khan@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).