RC buffer
Nicholas Wilson via Digitalmars-d
digitalmars-d at puremagic.com
Tue Nov 1 22:33:21 PDT 2016
On Wednesday, 2 November 2016 at 05:32:13 UTC, Nicholas Wilson
wrote:
> On Wednesday, 2 November 2016 at 05:00:23 UTC, Andrei
> Alexandrescu wrote:
>> I've eliminated all UTF nonsense from
>> https://github.com/dlang/phobos/pull/4878 resulting in a bare
>> reference counted buffer of (qualified) ubyte.
>>
>> The goal is to get the buffer @safe and be able to have a
>> reasonable explanation for each and every cast. (There are no
>> safety annotations currently, but the code passes unittests
>> and supports qualifiers.) No undefined behavior casts should
>> be used (e.g. that cast away immutability), only simple
>> adjustments for realities that the type system is unable to
>> cover.
>>
>> In order to make opAssign safe, a language change will be
>> necessary.
>>
>>
>> Andrei
>
> Shouldn't all those` assert(b ~ c == "bc".representation);`s be
> static asserts?
Derp. copied wrong line. I meant all the typeof asserts.
More information about the Digitalmars-d
mailing list