groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Theodorou <blackd...@gmx.org>
Subject Re: [Proposal] GString is implemented eager and treated as normal String since groovy 3.0.0
Date Tue, 11 Sep 2018 09:20:21 GMT


Am 11.09.2018 um 01:59 schrieb MG:
> Hi Jochen,
> 
> could you be more precise about where you see the problem(s) in your 
> example:
> 
> 1) That Wrapper is not an immutable class, and you can therefore change 
> its state after creation ?
> 2) That GString $-expressions (outside of "${-> ...}") do not capture 
> the expression, but the result of evaluating the expression (which 
> oftentimes will be an Object referece) ?
> 3) That GString is not immediately evaluated to its String representation ?
> 4) ... ?

The problem is user expectations. Many do not expect GString to be 
mutable, since they do not use it as a templating solution or something 
compareable. I think we should offer something here. That does not have 
to be GString in syntax at all.

Or we align more with Javascript tempalating and make GString immutable.

bye Jochen

Mime
View raw message