Igor Wiedler
October 05, 2013
910

Dysfunctional Programming (phpnw13)

October 05, 2013

Transcript

3. Immuteability: The property of functional programmers that prevents them from

shutting up about pure functional programming. – Reg Braithwaite @raganwald

19. \$numberCollection = new NumberCollection(); \$numberParser = new SimpleNumberStringParser(); \$firstParsedNumber =

\$numberParser->parse('1'); \$firstNumber = new SimpleNumber(\$firstParsedNumber); \$firstNumberProxy = new CollectionItemNumberProxy(\$firstNumber); \$numberCollection->add(\$firstNumberProxy); \$secondParsedNumber = \$numberParser->parse('1'); \$secondNumber = new SimpleNumber(\$secondParsedNumber); \$secondNumberProxy = new CollectionItemNumberProxy(\$secondNumber); \$numberCollection->add(\$secondNumberProxy); \$addition = new AdditionOperator('SimplePHPEasyPlus\Number\SimpleNumber'); \$operation = new ArithmeticOperation(\$addition); \$engine = new Engine(\$operation); \$calcul = new Calcul(\$engine, \$numberCollection); \$runner = new CalculRunner(); \$runner->run(\$calcul); \$result = \$calcul->getResult(); \$numericResult = \$result->getValue();

26. Inversion of control is really just a pretentious way of

saying “Taking an argument”. – Rúnar Óli @runarorama

9 6 8

acumulator

33. Number 42 String "Hello, cruel world." Map {:foo "bar", :baz

"qux"} List [:a :b :c] Set #{"Arthur Dent" "Ford Prefect"}

87. A foo foo foo foo B foo foo C foo

foo D foo foo E foo foo

92. Questions? • joind.in/{ 9471, 9472 } • github.com/igorw/edn • github.com/nikic/iter

• @igorwesome
93. References • The Paradigms of Programming by Robert W. Floyd

• Execution in the Kingdom of Nouns by Steve Yegge • The Value of Values by Rich Hickey • Are we there yet? by Rich Hickey