[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [External] : Re: The function naming convention used by Emacs.
From: |
Drew Adams |
Subject: |
RE: [External] : Re: The function naming convention used by Emacs. |
Date: |
Sun, 26 Sep 2021 17:26:13 +0000 |
> >there is also the "f" suffix for "function", e.g. `cl-incf'
> >and `cl-decf' ...
>
> The "f" in these cases stands for "field".
A suffix of `f' can stand for different things.
I think generally it stands loosely for "function".
The general idea is that some sort of function is
used to determine a generalized "place" that gets
updated in some way.
The most obvious and general case is `setf' whose
doc says that the first arg is a "function call
form" or it otherwise generally refers to a function.
And functions that are related to, or based on,
`setf' tend to use the `f' suffix.
Common Lisp uses lots of such "functions" (including
macros etc.) that are named with suffix `f'.
https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node80.html
There are also obvious exceptions where the `f'
isn't really a suffix. E.g. `...aref', `...if',
`...of', `ldiff', `result-of', `svref'.
And less obvious exceptions, which are related
to `setf': `getf', `remf', `incf', `decf',
`rotatef', `shiftf'.
- Re: The function naming convention used by Emacs., (continued)