Formal Review of std.uni

Jonathan M Davis jmdavisProg at gmx.com
Tue Apr 30 12:17:41 PDT 2013


On Tuesday, April 30, 2013 15:13:14 Dmitry Olshansky wrote:
> Unicode --> can't be done on character by character basis

Sure it can. It operates on dchar. I don't know what you've done with std.uni, 
but the way things have been laid out is that

std.ascii: Operates on dchars, doing ASCII operations, generally ignoring 
anything that's not ASCII.

std.uni: Operates on dchars, doing Unicode operations. The operations are 
generally the same as what you'd do with ASCII only with Unicode instead.

std.utf: Doing encoding related stuff with Unicode, so it operates on strings.

std.string: Operates on strings (almost always using Unicode)

So, with how it's been, std.uni would only be operating on dchars, and putting 
a function in there which operated on strings wouldn't make any sense. Maybe 
that doesn't work if you've done a bunch of grapheme stuff, and things will 
have to be adjusted, but it would be a definite shift to put anything in 
std.uni which operated on strings, and I think that it would need some definite 
justification (and there's a good chance that I'd be inclined to argue that it 
should still go in std.string, possibly using some internal modules if 
necessary).

But clearly I need to take the time to take a look at what you've actually 
done (I keep meaning to but haven't gotten around to it yet). It had been my 
impression that what you were doing was primarily a matter of improving the 
implementation, but it sounds like you're doing something beyond that.

- Jonathan M Davis


More information about the Digitalmars-d mailing list