A discussion worth having and we already do some of this, e.g. take a look at ASTNode and NodeMetaDataHandler in master. Just a reminder, 2.6 is still jdk7 capable. Groovy 3+ is JDK8 minimum, so the changes would be in 3+. For me, it's lower priority than some other things (including getting 2.5, 2.6 and 3 out the door). I think wholesale changes of that kind would be a great refactoring for 3.1 but I'm disinclined to have any more branches right now, so I'd hold off for a little bit. But if there is a good reason to we can start some such changes.
Incidentally, I did some quick fixes to get the binary compatibility report working again late last year after it being off for a while due to some dependency conflicts. There are some things to fix in that report but I also noticed that changes like the above were being flagged - methods "moved" up the hierarchy were being flagged as missing. Does anyone know how to hush those? Is there a setting for japicmp? Cheers, Paul. On Wed, Jan 3, 2018 at 9:04 AM, <[email protected]> wrote: > Now that Java 8 is the minimum required runtime, could some default > methods be added to interfaces such as org.codehaus.groovy.ast.expr.MethodCall > or org.codehaus.groovy.ast.Variable. For example, predicate checks like > isStatic(), et al. could be implemented in terms of getModifiers(), would > provide convenience to receivers of Variable instances, and would save a > bunch of repeated overrides in implementing classes. > > > > Can anyone think of other interfaces in core groovy that could benefit > from default methods? > > >
