Naming conventions for functions in similar modules
Lars T. Kyllingstad
public at kyllingen.NOSPAMnet
Wed Jun 22 13:30:25 PDT 2011
On Wed, 22 Jun 2011 09:53:39 -0700, Walter Bright wrote:
> On 6/22/2011 4:47 AM, Lars T. Kyllingstad wrote:
>> One problem: std.uni only contains functions for dealing with upper/
>> lower case and for checking whether something is an alpha character.
>> If you want the other functions, such as isDigit(), isPunctuation(),
>> etc. you still have to import std.ascii. And once you have imported
>> both std.uni and std.ascii, you are forced to disambiguate every time
>> you call a function which exists in both.
>
> True, but I don't see much of an improvement of:
>
> toAsciiLower()
>
> over:
>
> std.ascii.tolower()
>
> at least as far as typing goes.
I agree with that. My point was that maybe std.unit should also have
functions such as isDigit(), isPunctuation() etc. I suppose we want to
encourage the use of std.uni over std.ascii in most cases, since D is
supposed to handle Unicode out of the box.
-Lars
More information about the Digitalmars-d
mailing list