Do you like heavily nested loop-ridden code? Me neither! Here's the good news: your code doesn't have to be that way. Functional programming can help!

In this talk we'll cover how you can banish for and foreach loops from your code by better understanding the most common and accessible functional programming concepts: map, filter, and reduce. We'll draw out concrete examples in PHP that will let you filter down complex data (like arrays of fetched posts) in simpler ways than you may have thought possible. We'll show practical refactorings of hard-to-follow code into better functional PHP and JavaScript.

We'll also cover what functional programming is---it's more than just the "function" keyword---and how it can unlock whole new ways of thinking about the code we write.

Comments

Comments are closed.

TJ Draper at 11:06 on 17 Aug 2018

Lot's of good stuff here to make your code intentions clearer.

Kevin Smith at 15:29 on 17 Aug 2018

Nice to finally have an introduction to Functional programming that actually made sense. Easy to see how I can immediately use this approach to write cleaner, more easily understood code.

Roger Creasy at 06:13 on 18 Aug 2018

Great talk. This talk explained replacing loops in a clear and concise manner. Terrific job with information I can use.