On Tue, Mar 19, 2019, at 3:25 PM, Levi Morrison wrote: > Today in the Dart world, Bob Nystrom published an article called > [Making Dart a Better Language for UI][1]. I think it's an incredibly > relevant article, since it is essentially about comprehensions, why > they are a thing, as well as some of the design choices they made. > > I think everyone in this thread ought to spend the 10-15 minutes reading it. > > [1]: > https://medium.com/dartlang/making-dart-a-better-language-for-ui-f1ccaf9f546c
I love that explanation, and the solution they come up with sounds very elegant. There's only two caveats to it: * Something along those lines in PHP would be even more work, and again I'm still looking for someone who can implement the design here; without a volunteer for that, this discussion is all hypothetical. :-( * It doesn't seem like it would address the generator/iterator side, which is what my main target is. Splatting an array into another array sounds highly useful, but the style there wouldn't (as far as I can tell) offer any solution for the lazy-evaluation case which, as Rowan just pointed out later in the thread, is still highly important and impossible to get from a greedy-evaluation construct. --Larry Garfield -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php