Functional PHP

Functional programming. Some see that term and think "functions? You mean procedural programming. I've been doing that for years." Others see it and think "you mean that crazy academic nonsense that no one understands? Pfft!"

In truth, functional programming is fundamentally an approach to software development, not a particular language or syntax. With PHP 5.3, it is an approach that is now more readily available and powerful than ever before. Even if you're not writing in Erlang or ML, there is still much to learn from the principles of functional programming to help write better code.

This session will discuss the history of functional programming and how it compares to other programming paradigms (procedural and object-oriented). We will then delve into how to leverage the concepts and tools in PHP 5.3 to produce more robust code with an "algorithm-first" approach.

Schedule info
Status: 
Proposed
Session Info
Speaker(s): 
Track: 
Coding + Development
Experience level: 
Intermediate

Comments

Could you please tell us if this presentation will differ from the (excellent!) presentation about functional programming you did at Drupalcon Munich, and if so, how?

I expect it to be largely similar, but based on the feedback from Munich and from Sunshine PHP I want to try and compress the functional parts (probably spend a bit less time on anonymous functions) and add in more "OK, so how do I apply the concepts of purity, idempotency, and map/reduce-style thinking to non-functional code?" I had a little of that in the Munich version, but it was mostly "use array_map". I want to see if I can instead describe what a "pure object" would mean, for instance, since many of the natural benefits of a functional language require engine support, which we don't have. Purity, itempotency, etc. are universally good concepts, however.