std.experimental.collections.rcstring and its integration in Phobos
Eugene Wissner
belka at caraus.de
Wed Jul 18 12:03:02 UTC 2018
On Wednesday, 18 July 2018 at 11:37:33 UTC, Seb wrote:
> On Tuesday, 17 July 2018 at 17:41:05 UTC, 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.
>
> The problem here is this would also lead to very confusing
> behavior for newcomers, e.g.
>
> ```
> "ä".split.join("|") == �|�
> ```
Therefore it shouldn't compile at all, but
rcstring("ä")[].split("|")
or
rcstring("ä").byCodePoint.split("|")
More information about the Digitalmars-d
mailing list