Re: Strict switch statements
| From: | Stanislav Malyshev | Date: | Thu, 14 Jun 2018 22:15:06 +0000 |
| Subject: | Re: Strict switch statements | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-102268@lists.php.net to get a copy of this message | ||
Hi!
> Would both be more apparent as to its meaning and leave the door open
> for other uses. Though at that point, tbqh, I think `switch ($a) use
> (===) {...}` gives better visual isolation.
I don't think we should reuse the use() thing for third purpose when
we're already using it for two. I imagine with new parser logic we
should not be as restricted in syntax choices as we've been before? So
being a bit more explicit than "use(===)", which would be a bit of a
head-scratcher for a casual PHP user. Something like "strict switch" at
least gives a person something to ask about - what is "strict switch"
exactly? But "use(===)" would be harder to read and harder to look up
online.
--
Stas Malyshev
smalyshev@gmail.com