Re: Proposal: Change map access semantics in 4.0

2020-11-12 Thread Christopher Smith
> Just to clarify, there is no issue > when using the full getter name for property getter, correct? E.g. > map.isEmpty() > That's correct; explicitly invoking the methods always works. The current logic, though, leads to circumstances where def v1 = value obj.foo = v1 v1 != obj.foo (among other

Re: Proposal: Change map access semantics in 4.0

2020-11-12 Thread Paul King
Thanks for the email. It has been discussed numerous times before but that doesn't mean we can't re-look at certain aspects. Just to clarify, there is no issue when using the full getter name for property getter, correct? E.g. map.isEmpty() Cheers, Paul. On Thu, Nov 12, 2020 at 9:46 AM Christophe

Proposal: Change map access semantics in 4.0

2020-11-11 Thread Christopher Smith
This is a proposal for a breaking change for how Groovy interacts with objects implementing the Map interface. == Background == Groovy supports looking up the values of a map by converting property-style access `map.foo` to `map.get('foo')`. My understanding is that the purpose of this feature is