New std.uni: ready for more beating

Jacob Carlborg doob at me.com
Mon Feb 25 23:40:02 PST 2013


On 2013-02-26 08:34, Jonathan M Davis wrote:

> Well, it can get pretty bad with module names when you're forced to give the
> full import path. For instance, std.string, std.ascii, and std.uni all have
> toLower, and std.unicode.toLower is definitely longer than std.uni.toLower.

If you think that "std.unicode.toLower" is too long then create an alias 
for it.

BTW, I don't think it's fair to use the fully qualified name when 
comparing. Then we can never have a nested package hierarchy in Phobos 
or we will get names looking like:

std.a.b.c.d

> In general, names should be as long as they need to be in order to be properly
> clear and descriptive but no longer. Making names too short makes code harder
> to read and understand, and making them too long makes it harder to fit as much
> in a line of code without it getting too long.
>
> That being said, std.unicode is probably a better name than std.uni, but at
> this point, it's better to maintain backwards compatibility than to rename it.
> If we need to rename it because of changes in the API, then going with
> std.unicode makes sense, but if the necessary changes are backwards
> compatible, then we should avoid renaming it and thus avoid breaking code.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list