News for hackers. Stuff that matters.
Re:Dictionary and Set Improvements in Swift 4.0 by smitherfield on Thursday October 05, 2017 @12:45AM (#15406723)
I prefer Ruby's syntax too, but Swift also has a shorthand version which is, IMO, usually nicer.

  groceriesByDepartment.mapValues { $0.count }
Re:Dictionary and Set Improvements in Swift 4.0 by Groxx on Monday October 09, 2017 @06:41PM (#15438032)
stuff like this always makes me miss Ruby's even-shorter-hand version though :)

  groceriesByDepartment.mapValues(&:count)  # not ruby, but meh
Re:Dictionary and Set Improvements in Swift 4.0 by jakobegger on Thursday October 05, 2017 @03:56AM (#15407340)
The shorthand version doesn‘t let you specify argumen types (only works when they can be inferred)
Re:Dictionary and Set Improvements in Swift 4.0 by mantas on Thursday October 05, 2017 @05:20AM (#15407725)
Which is vast majority of cases. Unless you work with a lot of legacy ObjC code.