Naming of new lazy versions of existing Phobos functions
Tobias Pankrath via Digitalmars-d
digitalmars-d at puremagic.com
Sun Jul 20 13:42:16 PDT 2014
> Do we really want to be naming functions which aren't
> properties with adjectives instead of verbs? That seems very
> wrong to me. I'd much rather see stuff like setExt or
> setExtLazy than withExtension or extensionSet. Function names
> are supposed to be verbs unless they're emulating variables.
> They _do_ something, even if it's lazy.
>
> - Jonathan M Davis
I think it is appropiate to use adjectives for lazy functions.
The "Use verbs for functions"-rule holds no ground in lazy
evaluation, except you want to call them "wrapInExtensionSetter"
or something like that.
More information about the Digitalmars-d
mailing list