On Tue, Mar 12, 2019 at 10:12 AM Kalle Sommer Nielsen <ka...@php.net> wrote:
> 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've never liked "developers might use it wrong" as reason to not implement something, especially if hard to read/complex code is the worst impact to improper use. > 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. > I understand that you are talking about the syntax (which others have said is still up for discussion) and not the feature itself. I still wanted to make the comment above more a general response to that line of thinking. > > -- > regards, > > Kalle Sommer Nielsen > ka...@php.net > -- -- Chase chasepee...@gmail.com