Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on JDK 15. Parent comment
My absolute favorite thing is being able to do something like:
someIntegerCollection = someStringCollection*.toInteger()
canadianUsers = someUserCollection.findAll { user -> user.countryCode = "CA" }
canadianUsers = [user for user in someUserCollection if user.countrycode = "CA"]
There are no comments on this comment yet.
My absolute favorite thing is being able to do something like:
I also find the use of closures for things like collection filtering to be quite nice: The equivalent in Python is a little more cumbersome and overly verbose: I'll still be writing things in Python whenever I can, but when I do write in Groovy there's a lot of nice stuff I get to have.