~/talk

Writing extensible functional code

Talkat THE CONF 2017 · on Monday, 2017-10-02· [functional-programming, elixir-and-erlang]
links:none on file
slides:none on file

Shows using protocols/typeclasses (Elixir/Clojure/Haskell-style) to recover data-oriented extensibility: protocols/typeclasses dispatch on the first argument so implementations can live outside original modules. Uses a concrete geometry example (Point, Line, Nothing, Segment) to demonstrate the classic trade: adding a new shape forces edits to plain functions but adding a new operation forces edits to every type. With protocols the code can add new data without editing existing functions and add new operations without touching data types, but warns against blanket protocol use—it's a tradeoff.

AI-written summary · about

  1. 0:00Start
  2. 3:23Comprehensibility
  3. 6:25Accessibility
  4. 11:18Object-Oriented Solution
  5. 12:21Double Dispatch
  6. 14:10Compute the Length of a Geometric Shape
  7. 16:53Protocols
  8. 25:42Open Closed Principle
  9. 26:24The Interface Segregation Principle
  10. 27:27Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.