So how do you create an associative array with an immutable value, anyways?

FeepingCreature feepingcreature at gmail.com
Sat Oct 8 21:54:19 UTC 2022


On Saturday, 8 October 2022 at 20:58:09 UTC, Steven Schveighoffer 
wrote:
> On 10/8/22 1:09 PM, FeepingCreature wrote:
>> On Friday, 7 October 2022 at 20:04:48 UTC, Steven 
>> Schveighoffer wrote:
>>> Have you looked at the implementation for require? That's 
>>> exactly what it does.
>>>
>>> For reference: 
>>> https://github.com/dlang/dmd/blob/f4c21ccd6a73fee7abdea39cc38e8c64b627ffe1/druntime/src/object.d#L3457
>>>
>> 
>> Yeah okay so it's definitely possible, but I do feel it's 
>> kinda questionable to call barely documented internal 
>> implementation-dependent (?) runtime functions from user 
>> code...
>
> Perhaps you misunderstand -- I think druntime's `require` 
> should be updated to make this work.
>
> -Steve

Oh! Yeah, that seems like it should be viable.


More information about the Digitalmars-d mailing list