std.uni.toLowerCase / .toUpperCase
Jonathan M Davis via Digitalmars-d
digitalmars-d at puremagic.com
Thu Jun 25 07:29:15 PDT 2015
On Thursday, 25 June 2015 at 14:10:45 UTC, Vladimir Panteleev
wrote:
> And, IMHO, this:
>
> fileName.readText.lowerCased.detabbed.toFile(fileName.withExtension(".foo"))
>
> looks much better than this:
>
> fileName.readText.lowerCaser.detabber.toFile(fileName.extensionSetter(".foo"))
Well, I have to disagree there, particularly when the "er"
version of things is much more indicative of what's actually
going on (a series of constructor calls, really - they're just
done via wrapper functions). I can get behind the "asXxx" scheme
when the "xxxer" scheme doesn't fit, but in general, I think that
going with the "xxxer" scheme fits in very well with what's
actually going on and will thus actually help make the code
clearer, whereas I really don't think that that's the case with
"xxxed".
- Jonathan M Davis
More information about the Digitalmars-d
mailing list