ref on hidden this param
Steven Schveighoffer
schveiguy at gmail.com
Sun Oct 5 21:34:01 UTC 2025
On Sunday, 5 October 2025 at 07:40:25 UTC, TwoOfCups wrote:
> On Sunday, 5 October 2025 at 06:56:27 UTC, Richard (Rikki)
> Andrew Cattermole wrote:
>>
>> Why not use a static method instead?
>
>
> yeah i was thinking about doing that but like i said the
> serialization code is already a fucking mess of weird little
> special cases. so now i have to add checks for if the proxy
> functions are static and handle in a different way.
I use a static method for (de)serialization, it works pretty well.
You should require static methods IMO, this is the right
abstraction. Because you are creating a new instance, and that
requires different semantics than just overwriting an existing
one.
-Steve
More information about the Digitalmars-d
mailing list