std.uni vs std.unicode and beyond?

Idan Arye GenericNPC at gmail.com
Tue May 21 10:21:36 PDT 2013


On Tuesday, 21 May 2013 at 16:52:06 UTC, Steven Schveighoffer 
wrote:
> On Tue, 21 May 2013 12:43:01 -0400, Regan Heath 
> <regan at netmail.co.nz> wrote:
>
>> On Tue, 21 May 2013 17:25:23 +0100, Steven Schveighoffer 
>> <schveiguy at yahoo.com> wrote:
>
>>> It has nothing to do with the name.  I think unicode is 
>>> better.  But (allegedly) we have existing projects that use 
>>> std.uni, which would break if we renamed.
>>
>> Wouldn't the old std.uni remain but deprecated?
>>
>
> Deprecated functions don't compile.  Any code that uses it 
> would have to be modified.
>
> Only non-breaking solution would be to keep both.  In the past, 
> it has been suggested to have std.uni simply publicly import 
> std.unicode (or analogous solution to some other module 
> renaming).  You would always retain std.uni in this solution.
>
> -Steve

When `std.regexp` was deprecated, they used a pragma for the 
deprecation message:

https://github.com/D-Programming-Language/phobos/blob/2.062/std/regexp.d#L127L128

The same thing could be done for `std.uni`.


If there is a big plan to restructure Phobos then `std.uni` can 
be deprecated now, and be removed completely once the big 
backward compatibility break is done. If there is no such plan, 
the removal of `std.uni` will cause too much redundant breakage 
in no-longer-maintained libraries.


More information about the Digitalmars-d mailing list