unofficial mirror of emacs-tangents@gnu.org
 help / color / mirror / Atom feed
* Why is `nreverse' called `nreverse'?
@ 2023-10-30  6:00 Marcin Borkowski
  2023-10-30  6:32 ` Per Starbäck
  2023-10-30  9:17 ` Stephen Berman
  0 siblings, 2 replies; 6+ messages in thread
From: Marcin Borkowski @ 2023-10-30  6:00 UTC (permalink / raw)
  To: emacs-tangents@gnu.org

Hi all,

I know that the "n-" prefix means that it is destructive.  But why "n-"?
I also know that this comes from Common Lisp, but still -- why the
letter "n-"?

TIA,

-- 
Marcin Borkowski
http://mbork.pl

---
via emacs-tangents mailing list (https://lists.gnu.org/mailman/listinfo/emacs-tangents)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Why is `nreverse' called `nreverse'?
  2023-10-30  6:00 Why is `nreverse' called `nreverse'? Marcin Borkowski
@ 2023-10-30  6:32 ` Per Starbäck
  2023-10-30  7:08   ` [External] : " Drew Adams
  2023-10-30  9:17 ` Stephen Berman
  1 sibling, 1 reply; 6+ messages in thread
From: Per Starbäck @ 2023-10-30  6:32 UTC (permalink / raw)
  To: Marcin Borkowski; +Cc: emacs-tangents@gnu.org

The N- prefix for destructive functions is indeed present in Common
Lisp, but it goes further back than that. It is so in Maclisp, which
both Common Lisp and GNU Emacs Lisp have taken a lot from.
(If it also existed in lisps prior to Maclisp I don't know.) Pitman's
"The Revised Maclisp Manual" doesn't explain the N-. I guess it may
have come from NCONC.

Den mån 30 okt. 2023 kl 07:01 skrev Marcin Borkowski <mbork@mbork.pl>:
>
> Hi all,
>
> I know that the "n-" prefix means that it is destructive.  But why "n-"?
> I also know that this comes from Common Lisp, but still -- why the
> letter "n-"?
>
> TIA,
>
> --
> Marcin Borkowski
> http://mbork.pl
>
> ---
> via emacs-tangents mailing list (https://lists.gnu.org/mailman/listinfo/emacs-tangents)

---
via emacs-tangents mailing list (https://lists.gnu.org/mailman/listinfo/emacs-tangents)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [External] : Re: Why is `nreverse' called `nreverse'?
  2023-10-30  6:32 ` Per Starbäck
@ 2023-10-30  7:08   ` Drew Adams
  2023-10-31 17:26     ` Marcin Borkowski
  0 siblings, 1 reply; 6+ messages in thread
From: Drew Adams @ 2023-10-30  7:08 UTC (permalink / raw)
  To: Per Starbäck, Marcin Borkowski; +Cc: emacs-tangents@gnu.org

Googling tells me this:

https://stackoverflow.com/questions/4982732/what-word-is-abbreviated-by-n-in-names-of-destructive-lisp-functions

which tells me this:

https://gigamonkeys.com/book/they-called-it-lisp-for-a-reason-list-processing.html#destructive-operations
---
via emacs-tangents mailing list (https://lists.gnu.org/mailman/listinfo/emacs-tangents)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Why is `nreverse' called `nreverse'?
  2023-10-30  6:00 Why is `nreverse' called `nreverse'? Marcin Borkowski
  2023-10-30  6:32 ` Per Starbäck
@ 2023-10-30  9:17 ` Stephen Berman
  2023-10-31 17:25   ` Marcin Borkowski
  1 sibling, 1 reply; 6+ messages in thread
From: Stephen Berman @ 2023-10-30  9:17 UTC (permalink / raw)
  To: Marcin Borkowski; +Cc: emacs-tangents@gnu.org

On Mon, 30 Oct 2023 07:00:36 +0100 Marcin Borkowski <mbork@mbork.pl> wrote:

> Hi all,
>
> I know that the "n-" prefix means that it is destructive.  But why "n-"?
> I also know that this comes from Common Lisp, but still -- why the
> letter "n-"?
>
> TIA,

Paul Graham writes in ANSI Common Lisp (Chapter 12, page 202, footnote 2):

   The n originally stood for "non-consing."

Steve Berman

---
via emacs-tangents mailing list (https://lists.gnu.org/mailman/listinfo/emacs-tangents)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Why is `nreverse' called `nreverse'?
  2023-10-30  9:17 ` Stephen Berman
@ 2023-10-31 17:25   ` Marcin Borkowski
  0 siblings, 0 replies; 6+ messages in thread
From: Marcin Borkowski @ 2023-10-31 17:25 UTC (permalink / raw)
  To: Stephen Berman; +Cc: emacs-tangents@gnu.org


On 2023-10-30, at 10:17, Stephen Berman <stephen.berman@gmx.net> wrote:

> On Mon, 30 Oct 2023 07:00:36 +0100 Marcin Borkowski <mbork@mbork.pl> wrote:
>
>> Hi all,
>>
>> I know that the "n-" prefix means that it is destructive.  But why "n-"?
>> I also know that this comes from Common Lisp, but still -- why the
>> letter "n-"?
>>
>> TIA,
>
> Paul Graham writes in ANSI Common Lisp (Chapter 12, page 202, footnote 2):
>
>    The n originally stood for "non-consing."

Thanks!

-- 
Marcin Borkowski
http://mbork.pl

---
via emacs-tangents mailing list (https://lists.gnu.org/mailman/listinfo/emacs-tangents)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [External] : Re: Why is `nreverse' called `nreverse'?
  2023-10-30  7:08   ` [External] : " Drew Adams
@ 2023-10-31 17:26     ` Marcin Borkowski
  0 siblings, 0 replies; 6+ messages in thread
From: Marcin Borkowski @ 2023-10-31 17:26 UTC (permalink / raw)
  To: Drew Adams; +Cc: Per Starbäck, emacs-tangents@gnu.org


On 2023-10-30, at 08:08, Drew Adams <drew.adams@oracle.com> wrote:

> Googling tells me this:
>
> https://stackoverflow.com/questions/4982732/what-word-is-abbreviated-by-n-in-names-of-destructive-lisp-functions
>
> which tells me this:
>
> https://gigamonkeys.com/book/they-called-it-lisp-for-a-reason-list-processing.html#destructive-operations

Thanks!  I tried to find this on the Internet, too, but I was apparently
too stupid to formulate a correct query in the search engine...

Best,

-- 
Marcin Borkowski
http://mbork.pl

---
via emacs-tangents mailing list (https://lists.gnu.org/mailman/listinfo/emacs-tangents)

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-10-31 17:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-30  6:00 Why is `nreverse' called `nreverse'? Marcin Borkowski
2023-10-30  6:32 ` Per Starbäck
2023-10-30  7:08   ` [External] : " Drew Adams
2023-10-31 17:26     ` Marcin Borkowski
2023-10-30  9:17 ` Stephen Berman
2023-10-31 17:25   ` Marcin Borkowski

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).