Banishing Loops with Functional Programming

David Hayes (17.Aug.2018 at 10:00, 50 min)
Talk at Southeast PHP (English - US)

Rating: 5 of 5

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.

Who are you?

Claim talk

Talk claims have been moved to the new Joind.in site.

Please login to the new site to claim your talk

Want to comment on this talk? Log in or create a new account or comment anonymously

Write a comment

 
Please note: you are not logged in and will be posting anonymously!
= one plus three

Comments

Rating: 5 of 5

17.Aug.2018 at 11:06 by TJ Draper (9 comments) via Web2 LIVE

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

Rating: 5 of 5

17.Aug.2018 at 15:29 by Kevin Smith (1 comments) via Web2 LIVE

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.

Rating: 5 of 5

18.Aug.2018 at 06:13 by Roger Creasy (12 comments) via Web2 LIVE

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

© Joind.in 2018