December 29, 2019

Functional Design Patterns

Speaker

Scott Wlaschin, creator of F# for fun and profit

Thoughts

No much to add from previous talks about "features" of functional languages. I was expecting something more.

A bunch of terms and some "rules" made up that we should consider valid for some reason.

Quotes

Functions are things

Composition everywhere: Functions in the small, functions in the large

Types are not classes: Types are only the labels you use to describe the data input and data output of your functions

Types separate data from behavior

Totality is the behavior of a function to have a valid output value to every single input value

Use static types for domain modelling and documentation

Recomendations

  1. I should learn smalltalk!

  2. Don’t throw exceptions

  3. Parametrize all the things. We should decouple the behavior from the data.

  4. Function types are "interfaces". Function types provide instant abstraction

  5. Partial application

Tags: design functional patterns