On 21.12.2017 01:43, Nathan Harvey wrote:
I think these features are very similar. Expanding the "use" block's scope is
basically the same as adding a global extension method, in my opinion

we may have differing definitions for global here I guess. A lexical scope limited use-block is the plan for static categories.

(the
entire "use" schema doesn't seem to have any advantages over extensions
anyway).

extensions methods are always active, categories are not. As such you can induce specific controlled behaviour if you need it, when you need it. Extension methods don´t allow that level of control. I think that is an advantage, an important one for me, but I can very well imagine scenarios in which people do not care about that.

I think the best way forward is to get an experimental, working
implementation of same-module extensions. Once again, the syntax I mentioned
removes the necessity for annotations or special import statements. Perhaps
for temporary purposes an annotation should be introduced. What do you think
about this?

Sure, let us not be blinded by syntax discussions. Better is to define the static and dynamic semantics of the construct. But frankly, the dynamic semantics, the normal Groovy behaviour, is what did hold me back in the past here. Or should I say the implementation?

bye Jochen

Reply via email to