What word is abbreviated by "N" in names of destructive Lisp functions?
Asked Answered
O

1

12

What word is abbreviated by "N" in names of destructive Lisp functions?

Odeliaodelinda answered 13/2, 2011 at 6:3 Comment(0)
M
4

Here is a direct answer from Linearity's link:

The N stands for non-consing, meaning it doesn't need to allocate any new cons cells.

Instead of allocating new cells, the old cells are reused resulting in destructive/impure modifications.

Signalling destructive behavior is critical, but it's also nice to know that the non-consing variants are typically faster as they don't copy objects and leave garbage lying around.

The specific section containing this information is titled: "Destructive" Operations

Mathewson answered 2/6, 2020 at 4:54 Comment(2)
The N in SORT stands for iNvisible.Ceuta
@Ceuta perhaps the destructive sort algorithms they had in mind use cons in intermediate steps, resulting in conflict of whether to mark it with N or not.Mathewson

© 2022 - 2024 — McMap. All rights reserved.