Re: Deprecate and remove case-insensitive constants?
| From: | Rowan Collins | Date: | Tue, 12 Sep 2017 17:59:59 +0000 |
| Subject: | Re: Deprecate and remove case-insensitive constants? | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-100548@lists.php.net to get a copy of this message | ||
On 12 September 2017 17:45:46 BST, Levi Morrison <levim@php.net> wrote:
>The rest of my message only makes sense once you understand I was
>proposing unified case sensitivity for all symbols *and* merging them
>into one table.
Ah, OK, so I partially missed the point. I'm still not sure what you're suggesting is
sensible, though...
>> If we want function and class references, they should have their own,
>>unambiguous, syntax.
I stand by this assertion. Consider the following statement:
$foo = bar;
Even if "bar" cannot *simultaneously* be the name of a function, a class, and a constant,
it can still *potentially* be any of the three, from the point of view of the compiler.
So, far from allowing us to make nice inferences about function references vs
strings-that-look-callable, we have now *broken* assumptions we could previously have made.
It seems like we'd just be adding another equally ambiguous way of writing the same code.
Regards,
--
Rowan Collins
[IMSoP]