Naming of new lazy versions of existing Phobos functions
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jul 18 12:00:53 PDT 2014
On 7/18/2014 10:59 AM, Brad Anderson wrote:
> What do you think?
I'd leaven that proposal with the observation that functions are likely to be
lexically sorted by name. Hence, like functions should lexicographically be
adjacent to each other.
"setExtension" and "withExtension" will be widely separated, and a user looking
for such a function will likely see only one of them and not be aware of the
other, which may be a better fit for him.
Note that Microsoft often adds the suffix "Ex" when creating a new version of an
API function. It works well because the new and old will be sorted right next to
each other. I'm not suggesting that these ranges add that particular suffix,
just pointing out what others do.
More information about the Digitalmars-d
mailing list