New std.uni: ready for more beating
Jonathan M Davis
jmdavisProg at gmx.com
Mon Feb 25 23:34:29 PST 2013
On Tuesday, February 26, 2013 08:20:54 Jacob Carlborg wrote:
> On 2013-02-25 19:21, Dmitry Olshansky wrote:
> > What can I say Phobos is an example of software evolution ;)
>
> Is the new std.uni completely backwards compatible with the old one.
> Otherwise we have the same problem as with std.process. But in this case
> we have another name that is actually better.
>
> I'm having some problem understanding the obsession in shortening names,
> even when the full name isn't particular long.
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.
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.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list