Against deprecating aliases

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Thu Sep 29 00:47:46 PDT 2011


On 9/28/11 12:56 PM, Jonathan M Davis wrote:
> On Wednesday, September 28, 2011 21:43:13 Andrej Mitrovic wrote:
>> TLDR: Don't make Phobos upgrades annoying.
>
> Having toUTF and toUTFz is a marked improvement in many cases - especially for
> generic code. They're being added regardless of what the deal with toUTF16z
> is.
>
> The reason that toUTF16z is being removed is essentially because Andrei is
> very much opposed to having functions with specific types in their names and
> thinks that they should all be generic. Personally, I'm not opposed to keeping
> toUTF16z as an alias or wrapper to toUTFz. It's Andrei that seems to feel
> stongly about it. So, if enough people really want to keep toUTF16z, then I
> think that that can happen.

There is such a notion as too much of a good thing. That applies to file 
size, rote repetition in unittests, naming conventions, and more.

Suggestions I give should not be construed as immutable law that must be 
obeyed without applying good judgment.

> As for general compatability changes to Phobos, the idea at least is that we
> get all such changes out of the way (particularly major module redesigns) in
> the short term and then leave the APIs essentially stable in the long term.
> So, the number changes like this should be diminishing.
>
> As for the deprecation message issues, that's being worked on but no decision
> has yet been made on how exactly we're going to improve deprecated to handle
> it.

At best any deprecation should be because of some change that marks a 
net progress. We should avoid isometric effort.


Andrei


More information about the Digitalmars-d mailing list