Functional programming is a programming paradigm with origins in lambda calculus and the 1930's. Stack Overflow's developer survey 2017 shows 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 an actual functional language or make use of serverless architectures such as AWS Lambda. This session will cover:
- Introduction to lambda calculus
- Basic principles of functional programming
- Overview of the lstrojny/functional-php library
- Performance, compared to imperative programming style
- Reusability, compared to object-oriented coding
- Serverless computing as one of the great applications for functional programming paradigm

Comments

Comments are closed.

I like how Branislav starts with the basics of FP, explaining lambda calculus, very good introduction in general. Than he explains the essence of the FP, the motivation behind it and how/when/why(not) use it in PHP. I would suggest using a bit less negative approach toward some languages/methods/ideas, keep the positive examples.

Miro Svrtan at 10:37 on 29 May 2018

I loved the talk but feel like title is bit misleading, IMO this was more of introduction to FP than actual pros/cons of using it. Speaker was fluent and really engaging but would suggest to work on the questions for the audience as few were bit ambigous which made them hard to understand (I as a speaker have same issues).

The title is indeed a bit misleading, but asa talk that's an introduction to functional programming for PHP developers it was really well balanced between the mathematical and "pure" side of things and what's actually possible using PHP today.

Tomo Ε ala at 13:32 on 14 Jun 2018

Branislav delivered a great presentation, but I was actually expecting a bit more context and concrete examples of FP use in php, in comparison to OOP or just plain old spaghetti approach.

This was more of an introduction to FP, and a really good one at that - covering the basics, a bit of history, and simple to understand examples.

Branislav has clear diction and a solid vocabulary.