I'm 100% with Anthony Ferrara and Tony Marston on this.

Another grumpy old curmudgeon (in addition to myself, I mean, not those
two) describes four categories of bad stylists:

1. Under educated
2. Old school
3. Thrill seeker
4. Exhibitionist

The first two are pretty clear, I think. The Thrill seeker is the
programmer who gets a kick out exploring and using the trickier parts of a
language and putting them together in exciting ways[3]. The exhibitionist
is the programmer who's code needs to demonstrate superior cleverness or
other skills[2].

Short closure[4] will clearly be a boon for 3 and 4. But 1 and 2 will
suffer. Anthony explained already how the under educated will suffer. As
someone belonging to the old school, I should explain how I will suffer.

I like code that's boring and obvious. Economy with keystrokes and source
code bytes or vertical lines is a non-goal. Aesthetics is a non-goal. I
prefer code that, when I look at it again a year from now, it will be
immediately obvious a) what i intended it to do, and b) what it actually
does. This involves a lot of discipline, part of which is only using one
way to do such-and-such. So I use only a subset of the language and have
rules about what kinds of things each part applies to. To put it another
way, when I read "Love beautiful code? We do too. The PHP Framework For
Web Artisans" I feel a bit nauseous.

Hence an old school stylist like me will not use ~> and I won't allow it
in contributions. But I'll have to live with it in the wild. And that's
going to be confusing and I wont't be able to debug other people's code
and submit PRs. The new guard of ~> enthusiasts will correctly accuse me
of being old and useless so I may as well just put myself out to pasture
in a farm upstate.

In other words, ~> will end my career. Thanks :P

---

[3] A wonderful parody of the thrill seeker
https://www.reddit.com/r/programming/comments/dst56/today_i_learned_about_p
hp_variable_variables/c12np38

[2] https://github.com/twbs/bootstrap/tree/v1.4.0/js

[1] https://youtu.be/_EANG8ZZbRs?t=48m1s

[4] Why is it called this in PHP, btw? Only the optional `use ()` part is
closed over (sorta) and in this proposal, not even that happens.
"Anonymous function" seems very clear and descriptive. "Lambda" is great
if you want to show off. But closure?

Btw, => is not one of the good parts of ES6. About as good as classes, I'd
say.


On 8/31/15 3:29 PM, Bob Weinand wrote:


> I had this RFC in draft since some time, but delayed it due to all the
>ongoing PHP 7 discussions. Also we have no master branch to merge
>features in until 5.4 EOL. Thus I'm reviving this now.
> 
> Time for the first RFC targeting PHP 7.1 (assuming PHP 8 isn't going to
>be the next version ;-)):
> 
> The short Closures RFC:
> https://wiki.php.net/rfc/short_closures
> 
> Hoping for constructive feedback,
> Bob
> 





-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to