In Java, `int a = 0; assert a+=1` will fail to compile because expecting
boolean value, but `int a = 0; assert 0 == (a+=1)` is OK, so I think we
forbidden assignments seems not correct...
Cheers,
Daniel.Sun
-
Apache Groovy committer & PMC member
Blog: http://blog.sunlan.me
Twitter: @danie
+1 (binding)
Sent from my primitive tricorder
> On 12 Jan 2020, at 1:12, Paul King wrote:
>
>
>
> Dear development community,
>
> I am happy to start the VOTE thread for a Groovy 3.0.0-rc-3 release!
>
> This release includes 26 bug fixes/improvements as outlined in the changelog:
> https:/
Hi all,
I read an article[1] about the new features of Java 11 just now, and
find "JEP 309: Dynamic Class-File Constants"[2] can help us implement lazy
constants elegantly, e.g. `@Lazy static final Object SOME_LAZY_CONST =
`. The feature is very useful, so I propose to add *native*
support f
Several things to know:
- you can rewrite all access to a field marked @Lazy to use a constant dynamic,
that part can already be implemented. If you want to keep the compatibility
with Java 8, it means that you have to have two translations one for Java 11+
and one for Java 10-.
- if you want
Hi Daniel,
I have no technical input, but I use @Lazy all the time, it's a great
Groovy feature to avoid boilderplate code - so making it (internally)
better sounds like a good idea, if it is not too much effort G-)
Cheers,
mg
On 12/01/2020 13:34, Daniel.Sun wrote:
Hi all,
I read a
Hi Rémi,
> - if you want the bytecode getstatic to access the field, here you need the VM
> to be changed, it's in the roadmap for the VM but not yet implemented
I wish we could still access the constants with bytecode getstatic, which is
simple enough for us to use and read, but I do not know