-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
Description
Disclaimer: this only applies to procs with a mutating and non-mutating version. Not procs like pop that always mutate.
Context
There seems to be 2 conventions currently for proc that either mutate their arguments in-place or return a new T:
- Prefixing with a
mfor the mutating version:itemsandmitemspairsandmpairs
- Have the verb be the in-place mutation and the past participle return a new T
reverseandreversedinalgorithmsortandsortedrotateandrotated
History
A long time ago (September 2017), I was trying to find a name for in-place reciprocal (x -> 1/x), ensue a conversation on IRC with various propositions including reciprocaled and mreciprocal
Proposal
Some names are very strange to "-ed" but we can always prefix with a m. I would like to make all the new procs that accept out-of-place and in-place versions use the m prefix for their in-place version.
I also would like to add that to NEP-1.
Transition for current procs
I have no idea