Our Sister

Jack Stouffer via Digitalmars-d digitalmars-d at puremagic.com
Thu May 26 10:32:33 PDT 2016


On Thursday, 26 May 2016 at 16:11:22 UTC, Andrei Alexandrescu 
wrote:
> * Support const and immutable qualifiers for the character type.

How is that going BTW. Last I heard you were having problems with 
inout/const.

> * Support several views of the same string, e.g. given s of 
> type RCStr!char, it can be iterated byte-wise, code point-wise, 
> code unit-wise etc. by using s.by!ubyte, s.by!char, s.by!dchar 
> etc.
>
> [snip]
>
> RFC: what primitives should RCStr have?

Well, because we already have the standard library functions 
representation, byUTF, byCodePoint, byCodeUnit, and byGrapheme, I 
think RCStr should provide these names as methods which all 
return ranges. If possible, these would all work regardless of 
character or integer type of the data. So in effect, RCStr would 
have completely encapsulated data. Let's not make the same 
mistake that we made with string et al. by providing a default.

If at all possible, it would be great if it was also an output 
range.

> RCStr

*bikeshedding*: How about RCString, because the convention for D 
names is to be explicit most of the time.


More information about the Digitalmars-d mailing list