« Return to Thread: POC Release Announcement for Guilder Build Project

Re: POC Release Announcement for Guilder Build Project

by tugwilson :: Rate this Message:

Reply to Author | View in Thread


Mad Andy wrote:
 This project contains deferred GString evaluation because the  
data is not available when the GString is created and I did not want  
to force the user not to use double quotes.
Hi!

Can you give us a bit more detail about this? It sounds a little like the use of Closures in GStrings which allows you to do things like this:

def a = 1
def s1 = "${a}"
def s2 = "${->a}"
a = 1
println s1
println s2

prints
1
2

i.e. if you embed zero parameter Closures in a GString the closure is evaluated every time the GString is evaluated and the result of the Closure is embedded in the resulting string.

John Wilson

 « Return to Thread: POC Release Announcement for Guilder Build Project