Closed andreyorst closed 1 year ago
I believe the convention is that -p
is only for functions.
I've searched a bit over GitHub, and didn't found a lot of examples where boolean variables are named with -p
: haskell-mode, cling-mode, parinfer-rust-mode.
A lot of such variables were ending with imperative word implying that some action can be taken or not depending on the value, e.g. -enable
, -hover
, -format
, -split
. -import
Agree.
Style guide suggest to name functions that return booleans with
p
or-p
for "predicate", but what convention should be used for such variables, likefeature-enabled
orfeature-enabled-p
. These variables are used in predicate position inif
orwhen
, yet those aren't functions, so I'm a bit confused.