groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rhangaun ." <rhang...@outlook.com>
Subject RE: Swift's autoclosure in Groovy ?
Date Wed, 27 May 2015 13:43:39 GMT
Of course you can wrap the computation at the call-site, @autoclosure avoid the explicit wrapping.


Date: Wed, 27 May 2015 15:31:32 +0200
Subject: Re: Swift's autoclosure in Groovy ?
From: maciek.gorski@gmail.com
To: users@groovy.incubator.apache.org

Wouldn't something like this: 

foo(someLongCalculation("One"), someLongCalculation.curry("Two"))
def foo(Integer x, Closure<Integer> y) {} be equivalent?



2015-05-27 15:16 GMT+02:00 Rhangaun . <rhangaun@outlook.com>:



Has someone given a thought about adding someting equivalent to Swift's autoclosure annotation
in Groovy ?
http://www.archgrove.co.uk/weblog/2014/06/09/swift-semantics-auto-closing-over-parameters


 		 	   		  

 		 	   		  
Mime
View raw message