Hi Daniel,
I am (as you probably noticed) with you on the "Groovy 3.0 is the time to 
reevaluate some things in Groovy". 
Right now I am just not sure if any change in GString semantics would not break 
my framework, since I not only need to be able to access the GString embedded 
objects, but also output the current GString state convertd toString() for 
debug purposes...
Maybe what you propose could be gotten with an extended GString literal syntax, 
eg an "S"-prefix:
String s = S"x=$x" // equivalent to "x=$x".toString()
or simply a
String getS() { toString() }
property in GString class:
String s = "x=$x".s
?
Cheers,mg

-------- Ursprüngliche Nachricht --------Von: "Daniel.Sun" <[email protected]> 
Datum: 09.09.18  00:29  (GMT+01:00) An: [email protected] 
Betreff: Re: [Proposal] GString is implemented eager and treated as normal
  String since groovy 3.0.0 
Hi MG,

      No worries. This is just a proposal for the eager case of GString. We
will discuss further. According to the sample you provided, we should still
expose GString API.

      P.S.  Since groovy 3 will contain some breaking changes( mostly for
edge cases), it's an opportunity to refine existing implementation of
GString. 

Cheers,
Daniel.Sun



-----
Daniel Sun 
Apache Groovy committer 
Blog: http://blog.sunlan.me 
Twitter: @daniel_sun 

--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html

Reply via email to