Re: Fix remainder operator for BigInteger (GROOVY-10800)

2023-03-23 Thread Mario Garcia
On the other hand, I've been dealing with that in the past, and I agree that it would have been very helpful having @OperationRename, at least for prototyping. What I did in the past, was to create an extension for the specific library in order to be able to use operators everywhere in the

Re: Fix remainder operator for BigInteger (GROOVY-10800)

2023-03-23 Thread Paul King
We could go with an AST transform specifically for fixing "mod" but I don't think it is accurate to say the feature isn't wanted in its own right. We already do the same kind of rename using runtime metaprogramming all the time, we would now just have a way to do it using compile-time

Re: Fix remainder operator for BigInteger (GROOVY-10800)

2023-03-23 Thread MG
Hi Paul, @mod -> remainder: I am glad you went with the clean solution of a breaking change; sometimes alas that is the only good option, and, as you said, every other (clever) approach just feels like putting a band-aid on a band-aid, ultimately ending in a mess. @OperationRename: That

Re: Fix remainder operator for BigInteger (GROOVY-10800)

2023-03-23 Thread Mario Garcia
The idea of fixing inconsistencies is great. I also like the idea of giving a mid-term solution for those using the mod operator "incorrectly". But I'm not sure about opening the door for precisely overloading operators with different names than the ones specified by default, that seems to be just