Hi Den tir. 12. mar. 2019 kl. 15.49 skrev Chase Peeler <chasepee...@gmail.com>: > Everything looks weird and "non-phpish" when it's new. OO constructs weren't > PHP-ish at first, because PHP didn't originally support OO. Imagine "foreach" > didn't exist in PHP and we were still using while(list($key,$value) = > each($arr)) syntax. > > I agree that some of the examples are a bit hard to read and understand - but > that's only because we haven't been exposed to them.
What I mean here is that the lack of things like the parentheses makes the code generally harder to read, imagine this for large comprehensions as userland would certainly do things like that and you end up with monstrosities of code that is less verbose than the counter examples given in the RFC. I mean sure I could just rewrite a comprehension with a lot of whitespace, but it kinda seem to defeat the purpose of short circuited generators and I might as well just write it the more verbose way. I like the idea, just not the syntax because it has the potential (along with short closures) to be annoying to read in the long run. -- regards, Kalle Sommer Nielsen ka...@php.net -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php