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:[email protected]]
Sent: Wednesday, July 06, 2016 9:47 AM
To: [email protected]
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 <[email protected]>
<mailto:[email protected]>
Reply: [email protected] <mailto:[email protected]>
<[email protected]> <mailto:[email protected]>
Date: 6. juli 2016 at 15.37.21
To: [email protected] <mailto:[email protected]>
<[email protected]> <mailto:[email protected]>
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:[email protected]
<mailto:[email protected]>]
Sent: Wednesday, July 06, 2016 9:31 AM
To: [email protected] <mailto:[email protected]>
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 <[email protected] 
<mailto:[email protected]>>:

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.

Reply via email to