Proof of concept for v2 - NO duplication, NO `static if` hell, NO difficulty with interoperability

Atila Neves atila.neves at gmail.com
Mon Nov 8 14:16:03 UTC 2021


On Monday, 8 November 2021 at 14:04:40 UTC, bauss wrote:
> On Monday, 8 November 2021 at 14:01:18 UTC, Atila Neves wrote:
>> On Saturday, 6 November 2021 at 01:45:45 UTC, deadalnix wrote:
>>> On Friday, 5 November 2021 at 17:33:54 UTC, Andrei 
>>> Alexandrescu wrote:
>>>> On 2021-11-05 11:06, Paul Backus wrote:
>>>>> On Friday, 5 November 2021 at 14:08:58 UTC, Andrei 
>>>>> Alexandrescu wrote:
>>>>>> We never got reference counting to work in safe pure nogc 
>>>>>> code. And we don't know how. If we did, we could write a 
>>>>>> slice-like type that does everything a slice does PLUS 
>>>>>> manages its own memory. This is the real problem with 
>>>>>> containers.
>>>>> 
>>>>> I'm pretty sure at least some of us (including Atila) know 
>>>>> how.
>>>>
>>>> Please post the code, thanks!
>>>>
>>>> Main problem is getting reference counting to work reliably 
>>>> in the presence of purity and immutability.
>>>
>>> That and preventing the this pointer from escaping.
>>
>> Unless I'm missing something, `scope` and dip1000 cover that.
>
> Which he covered in his message here:
>
>> but instead we got a numerous features that don't quite work 
>> (@nogc, DIP1000, @live, ...).

That would indicate to me that dip1000 doesn't work for that 
purpose, which it does, unless there's something I'm not aware of 
that isn't an implementation bug. @live isn't, err... live yet. I 
talked to Amaury about his opinions on @nogc so I get where he's 
coming from there, but it does do what it says on the tin.


More information about the Digitalmars-d mailing list