Interesting PRs: bringing type system legitimacy to shared allocators

Stanislav Blinov via Digitalmars-d digitalmars-d at puremagic.com
Sun May 7 05:11:10 PDT 2017


On Sunday, 7 May 2017 at 11:46:33 UTC, Andrei Alexandrescu wrote:
> On 5/7/17 1:30 PM, Stanislav Blinov wrote:
>>>
>> 
>> To follow this discussion up, and in light of yesterday's 
>> Collections presentation at DConf, I though I'd go ahead and 
>> make a basic implementation of traits-based IAllocator.
>> 
>> You can find it here:
>> 
>> https://github.com/radcapricorn/alloctraits
>
> Cool, thanks. Before we saw that, Eduard and I are working on a 
> similar solution along the lines of IAllocator!(Flag!"nogc", 
> Flag!"safe"). -- Andrei

I guess the exact representation of "traits" is something to 
decide on. I have to say, even though I used the BitFlags-based 
solution, I'm not a big fan of that, the syntax is a bit 
unwieldy. Then again, Flag-based would be too.
Perhaps a struct with enum members could be used...


More information about the Digitalmars-d mailing list