Challenge: write a reference counted slice that works as much as possible like a built-in slice

Timon Gehr timon.gehr at gmx.ch
Tue Nov 9 16:30:41 UTC 2021


On 09.11.21 17:12, Stanislav Blinov wrote:
> On Tuesday, 9 November 2021 at 15:26:24 UTC, Dukc wrote:
> 
>> Functions like these could also solve the thing if only called from 
>> `@live`:
> 
> void foo(void*) @safe @nogc pure nothrow @live 
> @doYouStillRememberWhatTheFunctionNameIs
> {}
> 
> How many more attributes do we need before we realize that is not the 
> way to write ANY code?
It's uniquely bad in the case of @live, as ownership/borrowing of 
arguments and return values is not actually a property of the function.


More information about the Digitalmars-d mailing list