Hi and thank you for your appetite to contribute! I am not sure tackling this issue is the easiest thing to do. It has serious impacts on performance, but more importantly semantics, leading to breaking changes. This is something we tend to avoid. Jochen is probably going to give you more details here, but it's no surprise such an issue has been open for such a long time.
2015-07-16 4:36 GMT+02:00 Martin Lukas <[email protected]>: > Hi all, > I would like to contribute to Groovy by starting to provide an improvement > for [GROOVY-2756] (this one would be very useful for a library I started to > work on): https://issues.apache.org/jira/browse/GROOVY-2756 > > My approach would be the following: > > I would start by extending the > org.codehaus.groovy.classgen.asm.BinaryExpressionHelper such that the > following methods would be invoked "compareEqual", "compareLessThan", > "compareLessThanEqual", "compareGreaterThan", "compareGreaterThanEqual" in > case of ==,<,<=,>,>=. > > I would then like to add defaults of these methods to all Objects (or > Numbers/or Comparables?) that forward the request to the > org.codehaus.groovy.runtime.ScriptBytecodeAdapter static methods. This > would > ensure that in case there are no user-defined methods for comparison, the > default methods or compareTo() are used. Where would be the best place to > add this extension to the Object (or Numbers/or Comparables?) class? > > I would like to ask the Groovy experts if you think whether this approach > is > feasible or would you recommend a different approach? > > Thanks, > Martin > > > > > -- > View this message in context: > http://groovy.329449.n5.nabble.com/GROOVY-2756-Would-like-to-become-a-contributor-tp5726223.html > Sent from the Groovy Dev mailing list archive at Nabble.com. >
