fronx
code as a thinking tool
a sequence of things that happened
a story
1998“OOP is better because
it’s new”
2007“dynamic is better because it makes programs smaller”
2010expressiveness
correctness multiple computers
2013funemployment
types💕
2014“functional C++?”
different programming languages are about
different things
1.
you can use one language for thinking and another
language for implementing
2.
translating concepts directly can be a bad idea
3.
ok, let’s do this
different programming languages are about
different things
1.
C memory
Ruby runtime manipulation
Clojure persistent data structures
C++ memory ownership
Haskellthe potential existence of different kinds of things
and their relations to each other
Haskell
data, functions, and their types
Haskell
static view of systems
interlude 💃
⚡static dynamic
dynamic
stuff happening over time
machines doing things
communication
~
~
static
time-independent truths
things that are or aren’t possible~
dynamic static
i is set to 0
if multiple of 3, print
increment
repeat until at 10
input : [Int]
console.log : Int → Output
(%) : Int → Int → Int
filter : (a → Bool) → [a] → [a]
pathways through space
(%) : Int → Int → Int
print : Int → Output
Int%
Outputprint
pathways through space
filter : (a → Bool) → [a] → [a]
mod3 : Int → Bool
[Int]filter
Int → Bool
mod3
static
everything is a value everything has a type
dynamic
state
new stateaction
a path through space
(start)i = 0;
i == 0
i == 0console.log(i);
i == 1i++;
i == 2i++;
which model is better suited for thinking about programs?
💃 end of interlude.
conclusiondifferent languages have different perspectives
concepts of A can be used to think about the code of B
you can use one language for thinking and another
language for implementing
2.
where? when?
what language?
annoying questions
annoying questions
where? when?
what language?
save for later
step 1: understand the shape of the problem
conceptual building blocks
data functions types
order points in time
step 2: translate into a program
translating concepts too directly can be a
bad idea
3.
nested, immutable, non-empty lists
😔
http://pages.cs.wisc.edu/~remzi/Naur.pdf
“design” vs. “theory”