Improve our PHP code with ideas from Functional Programming

download Improve our PHP code with ideas from Functional Programming

of 14

  • date post

    27-Jul-2015
  • Category

    Software

  • view

    242
  • download

    3

Embed Size (px)

Transcript of Improve our PHP code with ideas from Functional Programming

1. Improving our PHP-code with ideas from Functional Programming PHP Herman Peeren 010PHP, June11, 2015 2. Functional Programming Non OOP (von Neumann) no state, just functions (without side effects) g(f(x)), etc. 3. No value-assignment needed everything is a function (input - output - processing) no mutable data Robert C Martin - Uncle Bob: Functional Programming; What? Why? When? https://www.youtube.com/watch?v=7Zlp9rKHGD4 Patkos Csaba: Functional Programming in PHP http://code.tutsplus.com/tutorials/functional-programming-in-php--net-35043 4. Imperative: HOW to do it $sum = 0; for($i = 1; $i