Consider switching Option.match parameter order? #52
Labels
chore
Rename files, upgrade dependencies, etc. (job often boring but needs to be done regularly)
refactoring
No change in functionality, but rewrite of some code
This is only a matter of personal preference, but here's my reasoning:
You routinely handle Eithers first with onLeft, then onRight. In other words, you handle the error first, which is fine.
For Options however, you handle the Some value before the None value. In other words, you handle the "error" last.
I understand this would mean a lot of refactoring for a lot of people, but I think this is more intuitive on the long-term.
The text was updated successfully, but these errors were encountered: