SpeakerConf: my findings in trying to use this functional programming business you guys keep talking...

Post on 13-May-2015

1.203 views 0 download

Tags:

Transcript of SpeakerConf: my findings in trying to use this functional programming business you guys keep talking...

Wednesday, August 8, 12

my findings in trying to use this functional

programming business you guys keep talking about

phil calçado@pcalcado

http://philcalcado.com

#speakerConf München

Wednesday, August 8, 12

are tests good design aid for programming with pure-ish functions?

my question:

Wednesday, August 8, 12

“dafuq? just use [Quick|Scala]Check LOL”

asking the FP community

“reason about your code or do not reason about your code,

there is no try”

Wednesday, August 8, 12

silly example:we have iOS push notifications; let’s introduce android

Wednesday, August 8, 12

written w/o tests

Wednesday, August 8, 12

writing some tests

Wednesday, August 8, 12

making it pass

Wednesday, August 8, 12

introducing android

Wednesday, August 8, 12

“Every function should have:- A single specific purpose- If possible, a generally useful purpose- A meaningful name- A structure that is simple to understand - An interface that is simple yet general enough”

Peter Norvig, Good Lisp Programming Style - http://bit.ly/u6JTPt

Wednesday, August 8, 12

other findings

Wednesday, August 8, 12

functional vs. object impedance happens all the

time

other findings

Wednesday, August 8, 12

Wednesday, August 8, 12

1) give up “functional” stages2) object-functional mapping

layer

stages must interact with ruby libs. options:

Wednesday, August 8, 12

there is something going on between category theory and software engineering*

* you know, the fairly anecdotal body of knowledge we use

other findings

Wednesday, August 8, 12

more types = less typingother findings

Wednesday, August 8, 12

more types = less typingother findings

ORLY? howmuch less?

Wednesday, August 8, 12

how much of testing as design aid can static

typing replace?

next question:

Wednesday, August 8, 12

phil calçado

http://philcalcado.com@pcalcado

www.soundcloud.com

Wednesday, August 8, 12