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

Walter Bright newshound2 at digitalmars.com
Wed Jan 22 01:03:33 UTC 2025


On 1/21/2025 1:47 PM, IchorDev wrote:
> On Monday, 20 January 2025 at 23:11:46 UTC, Walter Bright wrote:
>> Think of `cast(ref int)f` as "refer to `f` as if it were an `int`" and it will 
>> make perfect sense.
> 
> I agree that the syntax is confusing.

For a moment, sure. But think of it as I suggested, and it will clear away the 
confusion.



More information about the dip.development mailing list