Re: RFC idea: Block scoped variables with "let $x = expr"
| From: | Larry Garfield | Date: | Sun, 15 Mar 2020 18:53:16 +0000 |
| Subject: | Re: RFC idea: Block scoped variables with "let $x = expr" | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-109037@lists.php.net to get a copy of this message | ||
On Sun, Mar 15, 2020, at 1:28 PM, Mike Schinkel wrote:
> More specifically regarding PHP, the purpose of your proposed feature
> appears to be to allow longer and more complex functions and
> methods and more deep nesting. However, I think we should not be
> encouraging people to write longer and more functions and methods and
> nest more deeply. And I have unfortunately have had to refactor too
> many long and complex functions and methods and deep nesting written
> by others that I actively want try to discourage such approaches
> to coding, in PHP at least.
I agree with this sentiment. I've had little to no need for block-scoped variables since I
learned to properly factor my functions.
--Larry Garfield