groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Suderman Keith <keisuder...@vassar.edu>
Subject Re: [GEP]Lazy evaluation for Groovy 3
Date Sat, 17 Mar 2018 13:21:04 GMT
+1 for the concept.

-1 for using parenthesis.  As Andrew says, this introduces new behaviour for parenthesis that
I think violates the principle of least surprise.

Keith

> On Mar 17, 2018, at 1:54 PM, Andrew Bayer <andrew.bayer@gmail.com> wrote:
> 
> Agreed - I don’t think this actually provides much, if any, real value, is syntactically
confusing, and feels like it could cause some problems with existing code that assumes parentheses
aren’t going to result in new behavior.
> 
> A.
> 
> On Sat, Mar 17, 2018 at 8:35 AM Cédric Champeau <cedric.champeau@gmail.com <mailto:cedric.champeau@gmail.com>>
wrote:
> -1, I also think this is confusing.
> 
> 2018-03-17 13:30 GMT+01:00 Guillaume Laforge <glaforge@gmail.com <mailto:glaforge@gmail.com>>:
> I also find it confusing, in particular because it's not obvious, and there's some redundancy
already with @Lazy (and Paolo has a good point as well as using closures are somewhat of a
palliative as well)
> Perhaps we could think of ways to further improve / expand @Lazy perhaps?
> (rather than inventing something new / additional)
> 
> On Sat, Mar 17, 2018 at 12:01 PM, Paolo Di Tommaso <paolo.ditommaso@gmail.com <mailto:paolo.ditommaso@gmail.com>>
wrote:
> Frankly I found this confusing, it looks to me that the same concept can be implemented
just using a closure. 
> 
> 
> p
> 
> On Sat, Mar 17, 2018 at 9:08 AM, Daniel.Sun <sunlan@apache.org <mailto:sunlan@apache.org>>
wrote:
> Hi Guillaume,
> 
> I planed to generate proxy for lazy evaluation, so even if the reference of
> object is accessed, evaluation will not be triggered either, which is
> different from @Lazy
> 
> Cheers,
> Daniel.Sun
> 
> 
> 
> 
> --
> Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html <http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html>
> 
> 
> 
> 
> -- 
> Guillaume Laforge
> Apache Groovy committer & PMC Vice-President
> Developer Advocate @ Google Cloud Platform
> 
> Blog: http://glaforge.appspot.com/ <http://glaforge.appspot.com/>
> Social: @glaforge <http://twitter.com/glaforge> / Google+ <https://plus.google.com/u/0/114130972232398734985/posts>


Mime
View raw message