Talk in English - US at Lone Star PHP 2016
View Slides: http://johnkary.net/slides/loops/lonestar-php-2016/
Short URL: https://joind.in/talk/342a2
(QR-Code (opens in new window))
Comments are closed.
Such a good topic! Well presented intro into getting rid of loop cruft. Love it.
The description doesn't lie. This does change the way in which we think about loops.
The talk was very informative and brought a new way of looking at tackling (and avoiding) loops for cleaner more descriptive code.
Well presented. Interested to try some of these soon.
I've been using functional programming concepts in PHP for a while but never thought to use a collection pipeline. I'll definitely be integrating those packages into my projects.
Great challenge to the common use of explicit loops in our interpreted languages. +1 for anticipating my question about performance.
Great automated example of how to clean up code.
Enjoyed the talk, really made me think about the speed of writing code, vs being able to read it later.
I personally haven't used array map/reduce/filter so a brief description of the purpose on the slides of the function. You gave an example, and maybe you said it out loud, but I was deep in thought/read digestion of the code on the slide.
Rethinking Loops? I was expecting another talk on the humorously named IteratorIterator. What I got instead was astonishing - nothing less than chaining built in array processors to completely remove loops.
This one made me really ponder what I'm doing. All I could think was that I need to REFACTOR!!! Very concise.
Great talk. I liked this one better than the others I attended.
One thing though: using plain numbers (instead of variables) may not always be a good idea (like age). It is not always clear what the number is supposed to represent so maybe assign it to a constant (if not a variable). I do agree, though, if a variable is being used only once then it's better to just use the method call() instead of assigning the value to a variable and then using the variable.
I benchmarked the performance of array_map() vs foreach loop and array_map was always slower than foreach (and foreach is slightly slower than for loop). If speed is primary concern then using array_map() , array_reduce() might not be a good idea. I haven't benchmarked this for PHP7, yet so I'm not sure how PHP7 handles it.
This is a great topic! I am always looking for ways to eliminate loops and with this information I am ready to find new ways.
So I walked into this one with more intrigue than interest and I'm sincerely glad I did..
I default to loops most of the time because they're a nice hammer that I know. Using map reduce concepts to collapse and simplify loops is a powerful approach that I hadn't considered.
This is one of the few decks I've bookmarked to come back to later.
Interesting topic at how to avoid using loops. While I think some of them might be overkill just to avoid doing a loop, the talk was great at causing people to think of different ways to code without relying on loops all the time.