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

FeepingCreature feepingcreature at gmail.com
Mon Mar 3 09:37:57 UTC 2025


On Saturday, 1 March 2025 at 04:21:07 UTC, Elias Batek (0xEAB) 
wrote:
> 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`?

What does the * signify there? f is not a pointer.


More information about the dip.development mailing list