Skip to content

Latest commit

 

History

History
57 lines (40 loc) · 2 KB

notes.md

File metadata and controls

57 lines (40 loc) · 2 KB

Notes for FP Talk

(Things to consider to make this talk better for future audiences.)

  • Drop the promises style. It adds nothing, and confuses non JS people. Just use pipe.

  • Definitely reference Steve Yegge's post, Execution in the Kingdom of Nouns. Possibly make verbs-versus-nouns central theme.

  • Alternately, focus on OOP as tight coupling between data and operations, FP as building functional abstractions from common functions over similar types of data.

  • Functional: think of results, not steps. (In fact true of all declarative languages.) Think also of skipping a number of if statements, especially in pattern-matching languages.

  • Important reasons for using FP:

    ** Straightforward unit testing ** Easier debugging ** Simple concurrency ** Elegance and simplicity

  • Some features of FP:

    ** First-class functions ** Lambdas/Anonymous Functions with closures ** Compact, even terse, functions ** Mostly stateless processing, side-effect-free function calls ** Performant recursion through tail call optimization ** Pattern matching (Haskell, Erlang) ** Lazy Evaluation (Miranda, Haskell) ** Homoiconicity (mostly LISP-like languages?)

  • Consider using Michael Feather's quote:

    OO makes code understandable by encapsulating moving parts. FP makes code understandable by minimizing moving parts.

  • Consider mentioning John Backus' paper Can Programming Be Liberated From the von Neumann Style? A Functional Style and its Algebra of Programs

  • Consider mentioning John Hugh's paper Why Functional Programming Matters

  • Comics: ** http://imgs.xkcd.com/comics/tabletop_roleplaying.png ** http://imgs.xkcd.com/comics/functional.png