Why? Although concise, it requires in-the-know lore. What does "fold" mean? Which order are the params in? Why 2 arg lists? A pattern match _is_ a fold/catamorphism, it's just easier to read. In a team env, it's a no-brainer #scala
At work, we settled on pattern matching as "the" way to resolve an Option like 5 years ago, and nobody has wasted a single brain cycle on it since.
Beginners get a bit bamboozled by this sort of advice, and worry about whether they are "functional enough", which apparently involves using the most obscure available option for any particular use case.
• • •
Missing some Tweet in this thread? You can try to
force a refresh
🧵There's been a bit of an elephant in the room for Aussie FP community organisers the last couple of years. I thought it would be fun to share and compare notes.
The root of the "problem" is that functional programming won! /1
Almost every popular language has had FP features grafted on by popular demand, and in new languages functions-as-value, records, immutability, sum types and pattern matching are fast becoming de rigeur. Tutorials for react.js, expound the benefits of immutability at length. /2
More and more, the biggest source of new attendees for FP events are people who come across these ideas in mainstream languages, and want to see what the fuss is about. Ruby, JS, Java, C#, C++, Python devs. They're using FP at work every day now, in various degrees. /3
Of the crop of food-delivery businesses popping up, the most fascinating by far is EASI, aka 墨尔本送餐 - I'd love to see a newspaper profile on them.
In 2014 or so, they launched ~exclusively to the Chinese community~ in Melbourne - a bold choice in Oz perhaps, and testament to the Ch community's size & prosperity. Their yellow motorbikes were everywhere, marked only 墨尔本送餐 (Mò'ěrběn sòngcān, "Melbourne Food Delivery")
Even their website was Chinese-only: melbsc.com.au, and inscrutable yellow 墨尔本送餐 posters - could be seen on Asian restaurants all around the city. ("First delivery free"!)
"Arabic numerals", as a historical way of referring to our number system is only ever used when comparing it to, say, Roman numerals. Which is to say, once in 12 years of formal schooling.
It's easy to imagine a reasonable, educated, non-racist forgetting this
A reasonable, educated person might also take "Arabic numerals" to mean ۱,۲,۳..., which might have a bunch of non-racist reasons to teach or not teach in a US school.
No doubt there's a bunch of legitimate racism there too. Still. Plenty of stuff to whack America about without this self-righteous backslappy hi-fivery about obscure factoids