std.experimental.collections.rcstring and its integration in Phobos

rikki cattermole rikki at cattermole.co.nz
Wed Jul 18 03:18:22 UTC 2018


On 18/07/2018 5:41 AM, Jacob Carlborg wrote:
> On 2018-07-17 17:21, Seb wrote:
> 
>> - _no_ range by default (it needs an explicit `.by!{d,w,}char`) (as in 
>> no auto-decoding by default)
>>
>> What do you think about this approach? Do you have a better idea?
> 
> I vote for .by!char to be the default.

I'm thinking .as!T

So we can cover, ubyte/char/wchar/dchar, string/wstring/dstring all in one.

I think whatever we expose as the default for string/wstring/dstring 
however should be settable. e.g.

```
struct RCString(DefaultStringType=string) {
	alias .as!DefaultStringType this;
}
```

Which is a perfect example of what my named parameter DIP is for ;)


More information about the Digitalmars-d mailing list