-
What is Functiona Programming?
- Referential transparency:
same input - same result
- Information about possible inputs and outcomes
-
Why functional programming?
-
Immutability
-
How to Deal with Side Effects
-
Exceptions and Readability
- 分支主題 1
- Validations not equal to Exceptional situation
- Always prefer return values over exceptions
-
Primitive Obsession
- Wrap primitive types with separate classes
-
The Billion-dollar Mistake
- return null
-
Mitigating the Billion-dollar Mistake
-
Maybe<T>
-
Summary