DIP1000: Memory Safety in a Modern System Programming Language Pt.1
Steven Schveighoffer
schveiguy at gmail.com
Thu Jun 23 00:37:24 UTC 2022
On 6/22/22 5:58 PM, Dukc wrote:
> On Wednesday, 22 June 2022 at 20:48:13 UTC, Steven Schveighoffer wrote:
>> On 6/21/22 11:05 AM, Mike Parker wrote:
>> The part about `scope` being shallow. This is a problem.
>>
>> Is there any plan to address this other than "just use `@system`"?
>>
>
> I think a custom `struct` containing a GC:d slice of `scope` arrays
> could be done. The struct itself needs `@system` code of course but
> could be `@safe` from outwards perspective, unless there's some issue I
> haven't thought of.
>
> A relatively quick-and-dirty solution would be to use a static array for
> this, if you know some upper size the array can't exceed. Kinda cheap
> but probably better than `@system`.
You mean like a system function which removes the scope-ness of an
array? Let me introduce you to my other thread:
https://forum.dlang.org/thread/t7qd45$1lrb$1@digitalmars.com
-Steve
More information about the Digitalmars-d-announce
mailing list