groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Søren Berg Glasius (GR8Conf EU) <sbglas...@gr8conf.org>
Subject Re: changing "with" to return self or doto
Date Wed, 06 Jul 2016 12:35:22 GMT
I agree with Cedric. If you want to do a breaking change like this it
should wait until a major release, not a minor. I would not expect breaking
changes going from 2.4.x to 2.5.x

Best regards,
Søren Berg Glasius
GR8Conf Europe organizing team

GR8Conf ApS
Mobile: +45 40 44 91 88, Web: www.gr8conf.eu, Skype: sbglasius
Company Address: Buchwaldsgade 50, 5000 Odense C, Denmark
Personal Address: Hedevej 1, Gl. Rye, 8680 Ry, Denmark
--- GR8Conf - Dedicated to the Groovy Ecosystem

From: Cédric Champeau <cedric.champeau@gmail.com>
<cedric.champeau@gmail.com>
Reply: users@groovy.apache.org <users@groovy.apache.org>
<users@groovy.apache.org>
Date: 6. juli 2016 at 14.30.56
To: users@groovy.apache.org <users@groovy.apache.org>
<users@groovy.apache.org>
Subject:  Re: changing "with" to return self or doto

I think it's a too risky breaking change. I would go for a separate method.
x.self { ... }

2016-07-06 14:20 GMT+02:00 Jochen Theodorou <blackdrag@gmx.org>:

> We have an overlap of https://github.com/apache/groovy/pull/174 and
> https://issues.apache.org/jira/browse/GROOVY-3976. That I would like to
> discuss.
>
> Basically 3976 is about making "with" return the object it operates on.
> Right now we have
>
> 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
>

Mime
View raw message