You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@groovy.apache.org by Jochen Theodorou <bl...@gmx.org> on 2016/07/06 12:20:36 UTC

changing "with" to return self or doto

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

Re: changing "with" to return self or doto

Posted by Suderman Keith <su...@anc.org>.
> On Jul 6, 2016, at 10:41 AM, Jochen Theodorou <bl...@gmx.org> wrote:
> 
> 
> 
> On 06.07.2016 16:24, Suderman Keith wrote:
>> -1 to a breaking change (in 2.5 or 3.0).  I agree with Jason, breaking changes only for methods that are widely considered to be broken.
> 
> if no breaking changes even in a new major version, then when?

Well, I was simply speaking to this particular breaking change.  However, I am in agreement with Jason and breaking changes should only occur in major versions (maybe with some exceptions) and then only for very good, well agreed upon reasons.  

Keith

> 
>> 
>> -1 to a new method.  While a new method may be better than a breaking change I don’t like to see Object’s namespace become even more polluted with marginally useful methods.  I don’t think the current behaviour is so offensive that it requires an additional method on Object; is `x.with { it }` really that bad?
> 
> yes, I feel the namespace for Object is too polluted already as well.
> 
> bye Jochen

------------------------------
Research Associate
Department of Computer Science
Vassar College
Poughkeepsie, NY


RE: changing "with" to return self or doto

Posted by "Winnebeck, Jason" <Ja...@windstream.com>.
In my opinion, some things should never change. It's an attribute of the language. If Groovy is following semver, backwards compatibility should be broken only in 3.x, and in my mind, you should only break backwards compatibility for things widely considered broken or for very major improvements to the language. By widely considered broken, I mean functionality where everyone assumes it's really supposed to do X but it actually does Y. When you read a list of breaking changes everyone should think for each one "oh I thought it already did that" or "finally, it works the way it should". Then there is the category similar to what JDK 9 is doing with changing/hiding internal classes, at least you knew it was a risk going into using that code. But even with that, look at how much contention that has caused around the Unsafe class for example. Another example is Firefox's electrolysis project to make Firefox multi-process, it's something that had to be done but it took years to make the change and breaks everyone. Java and Firefox are massive communities strong enough to handle that. I don't think Groovy is strong enough to handle that or a "Python 3" type situation.

I don't think you want to ever change basic things about Groovy like methods such as "with", it would break huge amounts of programs in a way that is very hard to test or verify. If you do that, you might as well just call it a different language at that point. Even things like 1/2 = 0.5 and using BigDecimal by default will just have to stay "forever" even if not everyone likes it.

Jason

-----Original Message-----
On 06.07.2016 16:24, Suderman Keith wrote:
> -1 to a breaking change (in 2.5 or 3.0).  I agree with Jason, breaking changes only for methods that are widely considered to be broken.

if no breaking changes even in a new major version, then when?

----------------------------------------------------------------------
This email message and any attachments are for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message and any attachments.

Re: changing "with" to return self or doto

Posted by Guillaume Laforge <gl...@gmail.com>.
If we are to add a new method in 2.5 or 3.0 (we should definitely not
change the behavior of with{} IMHO), I really like "tap" as a name.

On Wed, Jul 6, 2016 at 4:53 PM, Juan Vazquez <ju...@gmail.com> wrote:

> Tim Yates created an extension module for tap.
>
>
> https://github.com/timyates/groovy-common-extensions/blob/master/src/main/groovy/com/bloidonia/groovy/extensions/ObjectExtensionMethods.groovy
>
> Thanks,
> Juan
>
> On Wed, Jul 6, 2016 at 9:41 AM, Jochen Theodorou <bl...@gmx.org>
> wrote:
>
>>
>>
>> On 06.07.2016 16:24, Suderman Keith wrote:
>>
>>> -1 to a breaking change (in 2.5 or 3.0).  I agree with Jason, breaking
>>> changes only for methods that are widely considered to be broken.
>>>
>>
>> if no breaking changes even in a new major version, then when?
>>
>>
>>> -1 to a new method.  While a new method may be better than a breaking
>>> change I don’t like to see Object’s namespace become even more polluted
>>> with marginally useful methods.  I don’t think the current behaviour is so
>>> offensive that it requires an additional method on Object; is `x.with { it
>>> }` really that bad?
>>>
>>
>> yes, I feel the namespace for Object is too polluted already as well.
>>
>> bye Jochen
>>
>
>
>
> --
> -Juan
>



-- 
Guillaume Laforge
Apache Groovy committer & PMC Vice-President
Developer Advocate @ Google Cloud Platform

Blog: http://glaforge.appspot.com/
Social: @glaforge <http://twitter.com/glaforge> / Google+
<https://plus.google.com/u/0/114130972232398734985/posts>

Re: changing "with" to return self or doto

Posted by Juan Vazquez <ju...@gmail.com>.
Tim Yates created an extension module for tap.

https://github.com/timyates/groovy-common-extensions/blob/master/src/main/groovy/com/bloidonia/groovy/extensions/ObjectExtensionMethods.groovy

Thanks,
Juan

On Wed, Jul 6, 2016 at 9:41 AM, Jochen Theodorou <bl...@gmx.org> wrote:

>
>
> On 06.07.2016 16:24, Suderman Keith wrote:
>
>> -1 to a breaking change (in 2.5 or 3.0).  I agree with Jason, breaking
>> changes only for methods that are widely considered to be broken.
>>
>
> if no breaking changes even in a new major version, then when?
>
>
>> -1 to a new method.  While a new method may be better than a breaking
>> change I don’t like to see Object’s namespace become even more polluted
>> with marginally useful methods.  I don’t think the current behaviour is so
>> offensive that it requires an additional method on Object; is `x.with { it
>> }` really that bad?
>>
>
> yes, I feel the namespace for Object is too polluted already as well.
>
> bye Jochen
>



-- 
-Juan

Re: changing "with" to return self or doto

Posted by Jochen Theodorou <bl...@gmx.org>.

On 06.07.2016 16:24, Suderman Keith wrote:
> -1 to a breaking change (in 2.5 or 3.0).  I agree with Jason, breaking changes only for methods that are widely considered to be broken.

if no breaking changes even in a new major version, then when?

>
> -1 to a new method.  While a new method may be better than a breaking change I don\u2019t like to see Object\u2019s namespace become even more polluted with marginally useful methods.  I don\u2019t think the current behaviour is so offensive that it requires an additional method on Object; is `x.with { it }` really that bad?

yes, I feel the namespace for Object is too polluted already as well.

bye Jochen

Re: changing "with" to return self or doto

Posted by Suderman Keith <su...@anc.org>.
-1 to a breaking change (in 2.5 or 3.0).  I agree with Jason, breaking changes only for methods that are widely considered to be broken.

-1 to a new method.  While a new method may be better than a breaking change I don’t like to see Object’s namespace become even more polluted with marginally useful methods.  I don’t think the current behaviour is so offensive that it requires an additional method on Object; is `x.with { it }` really that bad?

Keith

> On Jul 6, 2016, at 8:20 AM, Jochen Theodorou <bl...@gmx.org> wrote:
> 
> 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

------------------------------
Research Associate
Department of Computer Science
Vassar College
Poughkeepsie, NY


Re: changing "with" to return self or doto

Posted by "Søren Berg Glasius (GR8Conf EU)" <sb...@gr8conf.org>.
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 <ce...@gmail.com>
<ce...@gmail.com>
Reply: users@groovy.apache.org <us...@groovy.apache.org>
<us...@groovy.apache.org>
Date: 6. juli 2016 at 14.30.56
To: users@groovy.apache.org <us...@groovy.apache.org>
<us...@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 <bl...@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
>

Re: changing "with" to return self or doto

Posted by Jochen Theodorou <bl...@gmx.org>.
why self and not doto, as used by Ruby and suggested in the pull request?

On 06.07.2016 14:30, C�dric Champeau wrote:
> 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
> <ma...@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
>
>

Re: changing "with" to return self or doto

Posted by Cédric Champeau <ce...@gmail.com>.
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 <bl...@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
>

RE: changing "with" to return self or doto

Posted by "Winnebeck, Jason" <Ja...@windstream.com>.
I actually thought it was an expected feature of "with" to be able to return a value and assign it to a variable. I think it is bad to make such a breaking change in a 2.x version to such a fundamental method of Groovy. I use this extensively, especially in DSLs:

@groovy.transform.Canonical class Person { String mood; int age }

def people = [ new Person("happy", 30), new Person("sad", 20) ]

def findPeople = { c -> people.findAll { it.with(c) } }

findPeople { mood == "happy" && age > 10 }

The reason why I use with instead of setDelegate + call is that with clones the closure first while setDelegate modifies what was passed, which I think makes it not thread-safe? That's why I use "with" there.

Jason

-----Original Message-----
From: Jochen Theodorou [mailto:blackdrag@gmx.org] 
Sent: Wednesday, July 06, 2016 8:21 AM
To: users@groovy.apache.org
Subject: changing "with" to return self or doto

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

----------------------------------------------------------------------
This email message and any attachments are for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message and any attachments.

Re: changing "with" to return self or doto

Posted by Jochen Theodorou <bl...@gmx.org>.
I might have mixed things up, yes.. tap for Ruby, doto for Clojure

On 06.07.2016 16:10, Winnebeck, Jason wrote:
> I haven't heard of doto before, but it makes sense to use a method name that exists in another popular and similar language if it works in exactly the same way. You said that doto is in Ruby, although I could only find "doto" in Clojure, which works as people ask for. In Ruby I found a method "tap" (http://seejohncode.com/2012/01/02/ruby-tap-that/). I think either can make sense. It's hard for me to see "doto" as two words "do to" for whatever reason and "tap" is more expressive of the common use case, but perhaps not as immediately obvious as "do to".
>
> Jason
>
> -----Original Message-----
> From: Jochen Theodorou [mailto:blackdrag@gmx.org]
> Sent: Wednesday, July 06, 2016 9:47 AM
> To: users@groovy.apache.org
> Subject: Re: changing "with" to return self or doto
>
> and you are ok with "doto"?
>
> On 06.07.2016 15:38, S�ren Berg Glasius (GR8Conf EU) wrote:
>> +1 to making a new method
>>
>> Best regards,
>> S�ren Berg Glasius
>> GR8Conf Europe organizing team
>>
>> GR8Conf ApS
>> Mobile: +45 40 44 91 88, Web: www.gr8conf.eu <http://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: Winnebeck, Jason <ja...@windstream.com>
>> <ma...@windstream.com>
>> Reply: users@groovy.apache.org <ma...@groovy.apache.org>
>> <us...@groovy.apache.org> <ma...@groovy.apache.org>
>> Date: 6. juli 2016 at 15.37.21
>> To: users@groovy.apache.org <ma...@groovy.apache.org>
>> <us...@groovy.apache.org> <ma...@groovy.apache.org>
>> Subject: RE: changing "with" to return self or doto
>>
>>> My vote for whatever that's worth is never to change the way "with"
>>> works, even in 3.0, or any method that is not widely considered
>>> "broken". The request feels arbitrary to me, and in that case I would
>>> defer to existing behavior. So I vote to just create a new method if
>>> that behavior is needed.
>>>
>>> Jason
>>>
>>> -----Original Message-----
>>> From: Jochen Theodorou [mailto:blackdrag@gmx.org
>>> <ma...@gmx.org>]
>>> Sent: Wednesday, July 06, 2016 9:31 AM
>>> To: users@groovy.apache.org <ma...@groovy.apache.org>
>>> Subject: Re: changing "with" to return self or doto
>>>
>>> I have to confess I have been testing the waters a bit ;) Anyway, I
>>> am happy we decided on not having this in 2.5. The problem of course
>>> now is if we still want it as different method like doto or self, or
>>> if we really want to push this to 3.0 and what should I do with the
>>> poor guy from the pull request? Actually starting a 3.0 branch does
>>> not look right atm too.
>>>
>>> On 06.07.2016 14:41, Canoo wrote:
>>>> 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".
>>>>
>>>> Cheers
>>>> Dierk
>>>> sent from: mobile
>>>>
>>>>> Am 06.07.2016 um 14:20 schrieb Jochen Theodorou <blackdrag@gmx.org <ma...@gmx.org>>:
>>>>>
>>>>> We have an overlap ofhttps://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
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> - This email message and any attachments are for the sole use of the
>>> intended recipient(s). Any unauthorized review, use, disclosure or
>>> distribution is prohibited. If you are not the intended recipient,
>>> please contact the sender by reply email and destroy all copies of
>>> the original message and any attachments.
>
> ----------------------------------------------------------------------
> This email message and any attachments are for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message and any attachments.
>

RE: changing "with" to return self or doto

Posted by "Winnebeck, Jason" <Ja...@windstream.com>.
I haven't heard of doto before, but it makes sense to use a method name that exists in another popular and similar language if it works in exactly the same way. You said that doto is in Ruby, although I could only find "doto" in Clojure, which works as people ask for. In Ruby I found a method "tap" (http://seejohncode.com/2012/01/02/ruby-tap-that/). I think either can make sense. It's hard for me to see "doto" as two words "do to" for whatever reason and "tap" is more expressive of the common use case, but perhaps not as immediately obvious as "do to".

Jason

-----Original Message-----
From: Jochen Theodorou [mailto:blackdrag@gmx.org] 
Sent: Wednesday, July 06, 2016 9:47 AM
To: users@groovy.apache.org
Subject: Re: changing "with" to return self or doto

and you are ok with "doto"?

On 06.07.2016 15:38, Søren Berg Glasius (GR8Conf EU) wrote:
> +1 to making a new method
>
> Best regards,
> Søren Berg Glasius
> GR8Conf Europe organizing team
>
> GR8Conf ApS
> Mobile: +45 40 44 91 88, Web: www.gr8conf.eu <http://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: Winnebeck, Jason <ja...@windstream.com> 
> <ma...@windstream.com>
> Reply: users@groovy.apache.org <ma...@groovy.apache.org> 
> <us...@groovy.apache.org> <ma...@groovy.apache.org>
> Date: 6. juli 2016 at 15.37.21
> To: users@groovy.apache.org <ma...@groovy.apache.org> 
> <us...@groovy.apache.org> <ma...@groovy.apache.org>
> Subject: RE: changing "with" to return self or doto
>
>> My vote for whatever that's worth is never to change the way "with"
>> works, even in 3.0, or any method that is not widely considered 
>> "broken". The request feels arbitrary to me, and in that case I would 
>> defer to existing behavior. So I vote to just create a new method if 
>> that behavior is needed.
>>
>> Jason
>>
>> -----Original Message-----
>> From: Jochen Theodorou [mailto:blackdrag@gmx.org 
>> <ma...@gmx.org>]
>> Sent: Wednesday, July 06, 2016 9:31 AM
>> To: users@groovy.apache.org <ma...@groovy.apache.org>
>> Subject: Re: changing "with" to return self or doto
>>
>> I have to confess I have been testing the waters a bit ;) Anyway, I 
>> am happy we decided on not having this in 2.5. The problem of course 
>> now is if we still want it as different method like doto or self, or 
>> if we really want to push this to 3.0 and what should I do with the 
>> poor guy from the pull request? Actually starting a 3.0 branch does 
>> not look right atm too.
>>
>> On 06.07.2016 14:41, Canoo wrote:
>> > 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".
>> >
>> > Cheers
>> > Dierk
>> > sent from: mobile
>> >
>> >> Am 06.07.2016 um 14:20 schrieb Jochen Theodorou <blackdrag@gmx.org <ma...@gmx.org>>:
>> >>
>> >> We have an overlap ofhttps://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
>> >
>>
>> ---------------------------------------------------------------------
>> - This email message and any attachments are for the sole use of the 
>> intended recipient(s). Any unauthorized review, use, disclosure or 
>> distribution is prohibited. If you are not the intended recipient, 
>> please contact the sender by reply email and destroy all copies of 
>> the original message and any attachments.

----------------------------------------------------------------------
This email message and any attachments are for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message and any attachments.

Re: changing "with" to return self or doto

Posted by Jochen Theodorou <bl...@gmx.org>.
and you are ok with "doto"?

On 06.07.2016 15:38, S�ren Berg Glasius (GR8Conf EU) wrote:
> +1 to making a new method
>
> Best regards,
> S�ren Berg Glasius
> GR8Conf Europe organizing team
>
> GR8Conf ApS
> Mobile: +45 40 44 91 88, Web: www.gr8conf.eu <http://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: Winnebeck, Jason <ja...@windstream.com>
> <ma...@windstream.com>
> Reply: users@groovy.apache.org <ma...@groovy.apache.org>
> <us...@groovy.apache.org> <ma...@groovy.apache.org>
> Date: 6. juli 2016 at 15.37.21
> To: users@groovy.apache.org <ma...@groovy.apache.org>
> <us...@groovy.apache.org> <ma...@groovy.apache.org>
> Subject: RE: changing "with" to return self or doto
>
>> My vote for whatever that's worth is never to change the way "with"
>> works, even in 3.0, or any method that is not widely considered
>> "broken". The request feels arbitrary to me, and in that case I would
>> defer to existing behavior. So I vote to just create a new method if
>> that behavior is needed.
>>
>> Jason
>>
>> -----Original Message-----
>> From: Jochen Theodorou [mailto:blackdrag@gmx.org
>> <ma...@gmx.org>]
>> Sent: Wednesday, July 06, 2016 9:31 AM
>> To: users@groovy.apache.org <ma...@groovy.apache.org>
>> Subject: Re: changing "with" to return self or doto
>>
>> I have to confess I have been testing the waters a bit ;) Anyway, I am
>> happy we decided on not having this in 2.5. The problem of course now
>> is if we still want it as different method like doto or self, or if we
>> really want to push this to 3.0 and what should I do with the poor guy
>> from the pull request? Actually starting a 3.0 branch does not look
>> right atm too.
>>
>> On 06.07.2016 14:41, Canoo wrote:
>> > 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".
>> >
>> > Cheers
>> > Dierk
>> > sent from: mobile
>> >
>> >> Am 06.07.2016 um 14:20 schrieb Jochen Theodorou <blackdrag@gmx.org <ma...@gmx.org>>:
>> >>
>> >> We have an overlap ofhttps://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
>> >
>>
>> ----------------------------------------------------------------------
>> This email message and any attachments are for the sole use of the
>> intended recipient(s). Any unauthorized review, use, disclosure or
>> distribution is prohibited. If you are not the intended recipient,
>> please contact the sender by reply email and destroy all copies of the
>> original message and any attachments.

RE: changing "with" to return self or doto

Posted by "Søren Berg Glasius (GR8Conf EU)" <sb...@gr8conf.org>.
+1 to making a new method

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: Winnebeck, Jason <ja...@windstream.com>
<ja...@windstream.com>
Reply: users@groovy.apache.org <us...@groovy.apache.org>
<us...@groovy.apache.org>
Date: 6. juli 2016 at 15.37.21
To: users@groovy.apache.org <us...@groovy.apache.org>
<us...@groovy.apache.org>
Subject:  RE: changing "with" to return self or doto

My vote for whatever that's worth is never to change the way "with" works,
even in 3.0, or any method that is not widely considered "broken". The
request feels arbitrary to me, and in that case I would defer to existing
behavior. So I vote to just create a new method if that behavior is needed.

Jason

-----Original Message-----
From: Jochen Theodorou [mailto:blackdrag@gmx.org]
Sent: Wednesday, July 06, 2016 9:31 AM
To: users@groovy.apache.org
Subject: Re: changing "with" to return self or doto

I have to confess I have been testing the waters a bit ;) Anyway, I am
happy we decided on not having this in 2.5. The problem of course now is if
we still want it as different method like doto or self, or if we really
want to push this to 3.0 and what should I do with the poor guy from the
pull request? Actually starting a 3.0 branch does not look right atm too.

On 06.07.2016 14:41, Canoo wrote:
> 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".
>
> Cheers
> Dierk
> sent from: mobile
>
>> Am 06.07.2016 um 14:20 schrieb Jochen Theodorou <bl...@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
>

----------------------------------------------------------------------
This email message and any attachments are for the sole use of the intended
recipient(s). Any unauthorized review, use, disclosure or distribution is
prohibited. If you are not the intended recipient, please contact the
sender by reply email and destroy all copies of the original message and
any attachments.

RE: changing "with" to return self or doto

Posted by "Winnebeck, Jason" <Ja...@windstream.com>.
My vote for whatever that's worth is never to change the way "with" works, even in 3.0, or any method that is not widely considered "broken". The request feels arbitrary to me, and in that case I would defer to existing behavior. So I vote to just create a new method if that behavior is needed.

Jason

-----Original Message-----
From: Jochen Theodorou [mailto:blackdrag@gmx.org] 
Sent: Wednesday, July 06, 2016 9:31 AM
To: users@groovy.apache.org
Subject: Re: changing "with" to return self or doto

I have to confess I have been testing the waters a bit ;) Anyway, I am happy we decided on not having this in 2.5. The problem of course now is if we still want it as different method like doto or self, or if we really want to push this to 3.0 and what should I do with the poor guy from the pull request? Actually starting a 3.0 branch does not look right atm too.

On 06.07.2016 14:41, Canoo wrote:
> 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".
>
> Cheers
> Dierk
> sent from: mobile
>
>> Am 06.07.2016 um 14:20 schrieb Jochen Theodorou <bl...@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
>

----------------------------------------------------------------------
This email message and any attachments are for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message and any attachments.

Re: changing "with" to return self or doto

Posted by Jochen Theodorou <bl...@gmx.org>.
I have to confess I have been testing the waters a bit ;) Anyway, I am 
happy we decided on not having this in 2.5. The problem of course now is 
if we still want it as different method like doto or self, or if we 
really want to push this to 3.0 and what should I do with the poor guy 
from the pull request? Actually starting a 3.0 branch does not look 
right atm too.

On 06.07.2016 14:41, Canoo wrote:
> 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".
>
> Cheers
> Dierk
> sent from: mobile
>
>> Am 06.07.2016 um 14:20 schrieb Jochen Theodorou <bl...@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
>

Re: changing "with" to return self or doto

Posted by Canoo <di...@canoo.com>.
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".

Cheers
Dierk
sent from: mobile

> Am 06.07.2016 um 14:20 schrieb Jochen Theodorou <bl...@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