New names - 2.068 roundup

Vladimir Panteleev via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 25 06:59:39 PDT 2015


On Tuesday, 23 June 2015 at 22:45:10 UTC, Vladimir Panteleev 
wrote:
> 3. Change the names, with 2.068.0 RC1 being the deadline. I'll 
> create and will be updating a PR after the first beta, and ask 
> the release manager to merge it before the RC release.

So, the first Beta is out.

Here's a rough tally:

--------------------------------------

std.path.setExt
   withExtension
     +3 -2
   setExtensionLazy
     +1 -1 (not counting "xLazy" objections from toLowerCase 
subthread)

I think withExtension is the "winner" here. There are a few 
arguments in favor of a "Lazy" suffix, but many arguments against.

--------------------------------------

std.uni.toLowerCase (and toUpperCase)
   lowerCased
     +2 -? (all objections seem to be regarding anything that's 
not "fooLazy")
   asLowerCase
     +1
   inLowerCase
     +1
   toLowerLazy
     +4 -6
   lowerCaser
     +2 -1
   lowerCase
     +1 -1
   willLowerCase
     +1

No consensus. My thoughts:

- Appending "Lazy" has been argued for, but moreso against. I 
think the same arguments apply to "willLowerCase".
- The goal (and reason for renaming this function in the first 
place) is to make the lazy name memorably distinguishable from 
its eager counterpart, toLower. This rules out "lowerCase".
- Taking consistency as a factor, this leaves "lowerCaser" 
(consistent with e.g. "joiner" and "splitter"), "lowerCased" 
(consistent with e.g. "transposed" and "radial"), and 
"asLowerCase" (consistent with the only better name for 
"toAbsolutePath" that I could think of).
- "asLowerCase" and "lowerCased" does sound a bit more like 
proper English than "lowerCaser".

I'll go with "asLowerCase" for now, but there's still time for 
debate.

--------------------------------------

I just went through the list and found a few more candidates. I 
should've done that immediately, sorry about that - with the Beta 
out, this leaves little time to discuss those. I created new 
subthreads for all of them.

Here is a draft PR:

https://github.com/D-Programming-Language/phobos/pull/3439



More information about the Digitalmars-d mailing list