2 days ago
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`?
10 hours ago
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.
1 2 3 4
Next ›   Last »