groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Canoo <>
Subject Re: changing "with" to return self or doto
Date Wed, 06 Jul 2016 12:41:15 GMT
We can only make breaking changes where the old behavior was just wrong.
The proposal would have been ok as well if we had started with it. But given what we have
now, it is a "won't fix".

sent from: mobile

> Am 06.07.2016 um 14:20 schrieb Jochen Theodorou <>:
> We have an overlap of and
That I would like to discuss.
> Basically 3976 is about making "with" return the object it operates on. Right now we
> assert 1 == x.with {1}
> assert x == x.with {it}
> and after 3976 we would have:
> assert x == x.with {1}
> assert x == x.with {it}
> The mentioned pull request goes with the same logic, but using a new method. My opinion
on this is, that we should go for a breaking change in 2.5 and change "with", instead of adding
another method on Object.
> What do you guys think? Do you agree, or should we keep the current behavior, should
there be a doto method instead?
> PS: just in case some people are wondering... I am trying to get some of our old pull
requests in, there are too many and keeping them open so long is an insult to contributors..
> So if I do not forget about this and if there are no reactions I am going to change "with"
> bye Jochen

View raw message