First Draft: cast(ref T)... as shorthand for *cast(T*)&...

Elias Batek (0xEAB) desisma at heidel.beer
Sat Mar 1 04:21:07 UTC 2025


On Monday, 20 January 2025 at 23:11:46 UTC, Walter Bright wrote:
> On 1/20/2025 2:07 AM, Juraj wrote:
>> We now have local `ref`, and that makes this syntax a 
>> cognitive burden.
>
> Think of `cast(ref int)f` as "refer to `f` as if it were an 
> `int`" and it will make perfect sense.

Why not `cast(*ref int)f`?


More information about the dip.development mailing list