Java8 plugin that adds support for persistent local variables
1–7 of 7 posts
Re: Java8 plugin that adds support for persistent local variables
#2The doc says that the transformed variable name uses the method name for a suffix to avoid name clashing. But it needs to use the signature, right? Else you would have clashes for two methods with the same name (but different arguments).
I think it should also use $, since that's the convention to avoid clashes with user defined names.
Re: Java8 plugin that adds support for persistent local variables
#3Re: Java8 plugin that adds support for persistent local variables
#4But why? Is it just to prove you can (then fair enough) or is there a good reason to use this that I'm missing?
Also, it seems like (if abused) it would make unit testing really cumbersome without some sort of side-effecting mechanism to expose these persistent variables.
Re: Java8 plugin that adds support for persistent local variables
#5But why? Is it just to prove you can (then fair enough) or is there a good reason to use this that I'm missing?
Re: Java8 plugin that adds support for persistent local variables
#6Pretty neat. A simple transform, but I prefer this style and miss C's static in some cases. The doc says that the transformed variable name uses the method name for a suffix to avoid name clashing. But it needs to use the signature, right? Else you would have clashes for two methods with the same name (but different arguments). I think it should also use $, since that's the convention to avoid clashes with user defin…
Re: Java8 plugin that adds support for persistent local variables
#7But why? Is it just to prove you can (then fair enough) or is there a good reason to use this that I'm missing?
But it is a good example on how to write a plugin, with annotations and instrumentation. So the interesting parts are on the code implementing this functionality.