Pragmatic Functional Programming for PHP Developers
Functional programming is a programming paradigm with origins in lambda calculus and the 1930's. Stack Overflow's developer surveys from both 2017 and 2018 show that the languages optimized for functional programming are low in popularity. However, the same survey recognizes that developers actually working in Elixir, Clojure, F#, and Haskell, actually love their languages much more than PHP or C developers.
So functional programming is unpopular but fun!
The good news is that it can be applied in a popular language like PHP. Whilst the bad news is that PHP might not be 100% optimized for functional programming, we already have pretty nice libraries of functional primitives for PHP. Accepting functional programming style may help PHP developers develop a bit cleaner or more interesting code. More importantly, it will make it a whole lot easier to pick up a purely functional language (Hello, Haskell!) or make use of serverless architectures such as AWS Lambda. This session will cover:
- Introduction to lambda calculus
- Basic principles of functional programming
- Performance, compared to imperative programming style
- Reusability, compared to object-oriented coding
- Overview of the contributed libraries of functional primitives (e.g. lstrojny/functional-php)
- Combination of object-oriented and functional concepts FTW
- Serverless computing as one of the great applications for functional programming paradigm
The target audience for the session would be experienced PHP developers, but also juniors or students interested in learning about the logic behind the decision which approach or language to choose to solve a problem.