4 ms·
When I was introducing a team to Scala I wrote everything in a more verbose style just to make it clear, e.g. val num = words.count(word => word.nonEmpty) T
by philipkglass 3y ago
When I was introducing a team to Scala I wrote everything in a more verbose style just to make it clear, e.g.
val num = words.count(word => word.nonEmpty)
The "bird droppings" (particularly the clever uses of _ found across Scala) were hard for me to grasp when I first started working in the language. Now they're second nature, but I try to remain cognizant of future maintainers who may be coming in to make contributions or bug fixes without first marinating in the language.