std.uni.toLowerCase / .toUpperCase
Vladimir Panteleev via Digitalmars-d
digitalmars-d at puremagic.com
Wed Jun 24 06:35:04 PDT 2015
On Wednesday, 24 June 2015 at 05:20:38 UTC, Jonathan M Davis
wrote:
> If we want to be consistent with the likes of splitter, then
> they should be something more like lowerCaser and upperCaser
> (though caser isn't really word, and AFAIK, there is no noun
> for something which changes the case of a letter). When adding
> lazy versions in the past, for better or worse, we've generally
> gone for using nouns, whereas you're suggesting adjectives
> based coming from the past tense of a verb (though the verb "to
> case" has nothing with the case of letters).
I think splitter and joiner are the exception rather than the
rule, actually:
http://wiki.dlang.org/Naming_conventions
Most of the hypothetical names in that column (verb-noun) are
pretty ugly. I don't think this is a convention we should adopt.
The problem with toXCase is that there is neither a noun for an
upper-case transform, nor a verb for such an operation, such as
e.g. "capitalization" and "capitalize", so I think we should look
at it separately.
I think someone suggested lowerCased and upperCased somewhere, I
think there are fine too. There is some precedent (transposed and
indexed).
More information about the Digitalmars-d
mailing list