From ed4c5a3f795c463e6dcfa812ceceaadfdc8c3cff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Hurlin?= Date: Sun, 17 Dec 2023 20:56:55 +0100 Subject: [PATCH] Final amendments for 2023 course 1 --- slides/course-01.md | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/slides/course-01.md b/slides/course-01.md index 419f8a1..58cf63f 100644 --- a/slides/course-01.md +++ b/slides/course-01.md @@ -8,7 +8,7 @@ class: center, middle
-Clément Hurlin +Clément Hurlin, Director of Engineering, Tweag [https://github.com/smelc/tn-fp-haskell-course]([https://github.com/smelc/tn-fp-haskell-course) @@ -84,6 +84,12 @@ Those teams are at the top of their craft 💪 You will learn a lot working there +??? + +- Explain why there are many banking systems in here: + - GC okay + - Care about correctness + --- # Why functional programming? @@ -125,6 +131,9 @@ Highlight how things are more complicated in Java: - Need to handle `null` - Alternative implementations possible: in place change +- Should the result be immutable? + +- Discuss different kind of lists --- @@ -256,6 +265,7 @@ reverse (x : rest) = (reverse rest) ++ [x] -- Call reverse within reverse ??? - Discuss whether they know map/reduce +- Discuss heap problem/tail call optimization --- @@ -326,7 +336,7 @@ Expressions can be freely extracted into variables or substituted (inlined), whi --- -# Defining data structures +# Algebraic Data Types ```hs data Version = @@ -357,7 +367,7 @@ record SemVer(int x, int y, int z) implements Version { } ??? -Easy to define new expressions with _algebraic data types_ +- Also called _sum_ types --- @@ -388,6 +398,13 @@ toString :: Contains a String => a -> String toString (whatever :: a) = get whatever ``` +??? + +- Explain typeclasses are open abstractions + - You can define them far away from the type's definition +- Ask what's the problem? + - Conflicting definitions are possible +