I know, that I depend on a with{} returning what I make it return, so
making it return null or another value would be bad.

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: OC <[email protected]> <[email protected]>
Reply: [email protected] <[email protected]>
<[email protected]>
Date: 9. november 2016 at 20.33.17
To: [email protected] <[email protected]>
<[email protected]>, Jochen Theodorou <[email protected]>
<[email protected]>
Subject:  Re: .with() variant that returns the original object

Jochen,

On 9. 11. 2016, at 19:44, Jochen Theodorou <[email protected]> wrote:
...
> Also it should be noted that we already have an alias for "with", which
is "identity". I would not want to have yet another one.
> Frankly... I think we should change what it returns.

whilst I agree too many aliases is a bad thing, in my personal opinion,
breaking backward compatibility is worse.

> It is unlikely somebody did depend on with returning null.

I might be wrong as so often, but I can well imagine somebody depends on
the current behaviour, which, far as I understand, is not returning null,
but returning the result of the last expression in the closure -- precisely
what I would myself like to be available in future as "resultWith".

All the best,
OC

Reply via email to