On Saturday, 20 June 2015 at 09:27:16 UTC, Vladimir Panteleev
wrote:
Two examples of controversial name pairs: setExt/setExtension,
and toLower/toLowerCase. These functions have the same
functionality, but one of them is eager, and the other is lazy.
Can you guess which is which
If I had to hazard a guess, I'd go with "the shorter one is
lazy", but that presumes I'd notice there were two
nearly-identical functions in the first place and pick up on the
not-well-conveyed implication that one is lazy and the other is
not. That's a Bad Thing.
And it's a bad thing everyone seems to be tip-toeing around, too.
None of the suggestions I've seen so far really call out to me
"hey, this is lazy and has a non-lazy counterpart". Would it be
so wrong to add "lazy" to the beginning or end so it's super
obvious at a glance with zero cognitive overhead?
-Wyatt