Even without the deep insight into the inner workings of Groovy you guys have, I would tend to agree with Jochen here:

1. Option 4 looks to be the clean, most flexible & general option.
2. Specialized support for equality that handles or makes handling
   easier for both equality operator and equals could maybe be supplied
   in a TypeCheckingExtension sub-class or a helper class... (?)

Cheers,
mg


On 08/04/2024 15:28, Jochen Theodorou wrote:

Our options seem to be:
(1) not trying to make this work
(2) modify operators to method call expressions earlier (might remove
some optimization steps)
(3) tweak StaticTypeCheckingVisitor#visitBinaryExpression to support
before/after method call hooks for known cases like equals/compareTo
with a pretend method call
(4) alter the TypeCheckingExtension interface with before/after binary
expression calls.

[...]

Does anyone have strong opinions on this before I start having a play
and seeing what might work? In particular, a preference for option 3
or 4?

Doing that only for special cases does not sound right to me. I would be
for option 4... is there anything speaking against that?

bye Jochen

Reply via email to