working with attributes
Timon Gehr
timon.gehr at gmx.ch
Fri Jan 12 23:13:44 UTC 2024
On 1/12/24 21:52, Walter Bright wrote:
> On 1/12/2024 6:54 AM, Timon Gehr wrote:
>> Do you think virtual methods and runtime delegates were a mistake in
>> general?
>
> I don't like opApply() because it does a hidden rewrite of the
> statements in the function that makes the semantic analysis fragile,
> ugly and clumsy.
>
> I'm a bit amazed it works at all :-/
>
> Virtual methods and runtime delegates don't have this problem.
My own `opApply` implementation is relatively straightforward:
https://github.com/tgehr/d-compiler/blob/master/semantic.d#L8868-L8915
https://github.com/tgehr/d-compiler/blob/master/semantic.d#L9174-L9227
https://github.com/tgehr/d-compiler/blob/master/semantic.d#L9882-L9889
https://github.com/tgehr/d-compiler/blob/master/semantic.d#L9972-L9985
https://github.com/tgehr/d-compiler/blob/master/semantic.d#L10037-L10047
https://github.com/tgehr/d-compiler/blob/master/semantic.d#L10059-L10064
More information about the Digitalmars-d
mailing list