Slide 1

Slide 1 text

Why I care about Nuno Alexandre nunoalexandre.com

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

Overview 1. Premise 2. Why Haskell 3. From OOP to FP 4. Haskell Goodies 5. Wrap up 6. Q & A

Slide 4

Slide 4 text

To Digest

Slide 5

Slide 5 text

Why Haskell • functional thinking • mathematical based • a great type system • beautiful code • features 20 years ahead • rigorous & constrained • challenging

Slide 6

Slide 6 text

From OOP to FP • Objects vs Functions • A matter of granularity

Slide 7

Slide 7 text

From OOP to FP

Slide 8

Slide 8 text

From OOP to FP • OO starts low and abstracts as necessary PeopleGroup Group *BaseClass PersonUtils

Slide 9

Slide 9 text

From OOP to FP • In FP abstraction is the starting point • Reusable • Decoupled • Composition

Slide 10

Slide 10 text

First Look

Slide 11

Slide 11 text

Haskell Goodies • Purely functional • Laziness • Pattern Matching • Lambdas & Currying

Slide 12

Slide 12 text

Purely Functional • Immutability • Purity • Explicit side-effects through Monads

Slide 13

Slide 13 text

Purely Functional Immutability

Slide 14

Slide 14 text

Purely Functional Purity
 • same result for same arguments • no side-effects • referential transparency

Slide 15

Slide 15 text

Purely Functional Explicit side-effects through Monads http://nunoalexandre.com/2016/10/13/the-monad-pattern

Slide 16

Slide 16 text

Laziness • Idle until necessary otherwise • Declarative thinking

Slide 17

Slide 17 text

Pattern Matching • http://nunoalexandre.com/2016/11/17/the-joy-of-pattern-matching

Slide 18

Slide 18 text

Pattern Matching • On custom types

Slide 19

Slide 19 text

Pattern Matching • On lists

Slide 20

Slide 20 text

Pattern Matching • On polymorphism

Slide 21

Slide 21 text

Pattern Matching • On binding

Slide 22

Slide 22 text

Lambdas • anonymous & Turing-complete http://nunoalexandre.com/2016/09/16/love-the-lambda

Slide 23

Slide 23 text

Currying • beautiful partial applications http://nunoalexandre.com/2016/09/13/a-taste-of-curry-an-apologetic

Slide 24

Slide 24 text

Drawbacks • Space complexity is hard to debug • Not such great tooling • Memory consumption • Hard to learn independently

Slide 25

Slide 25 text

Conclusion • Languages are not just tools • Think different • Purity is beauty • Scientific certainty

Slide 26

Slide 26 text

Advanced Topics • Monads & Monads Transformers • Functors, Applicative Functors and Monoids • Category Theory

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

Q & A