Against deprecating aliases

Christophe travert at phare.normalesup.org
Thu Sep 29 01:54:37 PDT 2011


Andrej Mitrovic , dans le message (digitalmars.D:145645), a écrit :
> Another pull has been made right now which takes down more functions
> and creates deprecated forwarding functions:
> https://github.com/D-Programming-Language/phobos/pull/279
> 
> Honestly I don't understand the point of deprecating convenient
> functions like that. It makes perfect sense to make a single toUTF(z)
> template from an implementation point of view, but it doesn't make
> sense to remove convenient toUTF8(z)/toUTF16(z) symbol names. Simple
> aliases could be created that sit in Phobos.

I agree, as long as a function name don't pollute the namespace, there 
is no reason to remove it, especially when it is convenient.

I don't see what a function named toUTF8 could do except what it 
actually does, so why would you bother people using them ?

Deprecation should be used when there is a real cost to maintaining the 
function, or when the name was poorly chosen and could be reused for 
something else.

-- 
Christophe


More information about the Digitalmars-d mailing list