Arbitrary abbreviations in phobos considered ridiculous
Jonathan M Davis
jmdavisProg at gmx.com
Fri Mar 9 14:56:35 PST 2012
On Friday, March 09, 2012 17:41:01 Steven Schveighoffer wrote:
> I'll say I *don't* agree with the rejection of aliases on principle --
> aliases can be extremely useful/helpful, and they cost literally nothing
> (the "cognitive cost" on the docs is a BS argument IMO). I just don't
> agree with consuming so many common symbols for the sake of sugar.
aliases need to have a really good argument for existing. If UFCS is fully
implemented, then I think that there is _some_ argument for having stuff like
hours and minutes, because then you can do stuff like 5.seconds() (though
honestly, I really don't like the idea). The alias enables different usages
rather than simply being another name for the same thing.
Now, in this particular case, it's that much worse for exactly the reason that
you're against it: it uses common names for free functions. It's not as big a
problem as it would be in C or C++, but it's still a problem. There's also
some risk that it will break code.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list