doekenorg
Joined 5 years ago
Joined 5 years ago
``` foreach (new LimitIterator($generator, 0, 3) as $value) { echo $value; } ```
I'm not suggesting that PHP is the ideal tool for every use case. The goal is to share a concept that might be unfamiliar to some developers, using PHP as the context.
Sometimes learning about a concept in a familiar language helps you recognise where it might be useful elsewhere or apply it in a language that supports it better.
Terms like coroutines, concurrency, promises, etc, can be confusing; I just like to demystify them with easy-to-grasp examples. That does mean that examples can be contrived or very simple, but they are designed to get the point across.
Thanks for all the comments so far!
Getting the PDF properly tagged (real heading structure, reading order, language, alt text carried through) felt like the bare minimum for this particular document. :-)
Planning to open source the build script once it's a little more mature.