On 22 June 2026 17:38:29 BST, Bob Weinand <[email protected]> wrote:
>
>I don't think we should deprecate "let". let is universally used for 
>block-scoping in other languages. I don't think PHP should ever have 
>block-scoping inside functions. The corresponding RFC was also declined with 
>50%+ of the vote. Hence I don't think we should deprecate a name which won't 
>ever be needed.

The RFC raised was for a unique-to-PHP concept of a special "scope block" using 
the "let" keyword in a way no other language does. Taking that vote to mean 
nobody wants block scoping is a huge stretch.

In fact, I think block scoping would be a really useful addition to the 
language, and hope someone brings forward a proposal which more closely mirrors 
other Algol-descended languages. For me, it is a prerequisite for auto-capture 
closures, because it gives a way to unambiguously opt *out* of capture; but it 
also has plenty of other uses, just as it does in other languages.

Whether we need to reserve the name to allow that, I will leave to those who 
know more about the parser.


Rowan Tommins
[IMSoP]

Reply via email to