This post originated from an RSS feed registered with Java Buzz
by s m.
Original Post: Groovy/Groovy++ object creation
Feed Title: IntelliJ IDEA Blog
Feed URL: http://blogs.jetbrains.com/idea/feed/
Feed Description: News, tips&tricks, how-to's and other issues related to IntelliJ IDEA
Groovy’s as keyword allows for some interesting features. In particular, it provides a convenient syntactic sugar for object creation:
Point point = [4, 2] as Point
KeyAdapter listener = [
keyTyped: { e -> … },
keyReleased: { e -> … }
] as KeyAdapter
Still in development, but already quite usable, there is Groovy++: a library which adds static typing, [...]