std.uni vs std.unicode and beyond?

deadalnix deadalnix at gmail.com
Thu May 23 20:36:24 PDT 2013


On Friday, 24 May 2013 at 03:19:48 UTC, Marco Leise wrote:
> Am Tue, 21 May 2013 20:34:02 +0200
> schrieb Jacob Carlborg <doob at me.com>:
>
>> On 2013-05-21 19:53, Idan Arye wrote:
>> 
>> > The problem is that people that need Unicode stuff see 
>> > `std.utf` and
>> > assume that all Unicode related stuff are there.
>> 
>> I never can remember if I should look in std.utf or std.uni. 
>> That wouldn't change if it was renamed to std.unicode.
>
> ...and looking at the content I really wonder what the
> distinction is. I wouldn't say that "Unicode" is much more
> than "Utf". All in all it is another way (or several ways) to
> assign numbers to characters. Before this long discussion I
> thought "std.encoding.unicode", "std.encoding.ascii", etc.
> makes sense and I still think so. It also makes it more
> likely that authors of such modules try to keep a common
> layout or set of functions for everything in std.encoding.
> Just my 2¢ ;)

To make it precise, unicode is a association between characters 
and numbers. An encoding is how theses number actually are stored 
in a file. Typical encoding for unicode are utf-8/16/32


More information about the Digitalmars-d mailing list