On Thu, Sep 14, 2017 at 11:37 AM, François Laupretre
<franc...@tekwire.net> wrote:
> Le 14/09/2017 à 15:38, Alain Williams a écrit :
>>
>> I vote for making it case sensitive: simpler for the parser; the
>> programmer
>> rapidly learns that it should be 'TRUE' and not 'true' -- job done.
>
>
> No need to force people to switch their code to 'TRUE'. Just supporting
> case-sensitive 'TRUE', 'true', and 'True' (the same for false and null)
> should be enough. Not supporting 'tRUE' or 'TrUe' anymore will also be a
> positive side effect for code readability.
>
+0.9 this.  It feels pretty simple to resolve this special-case for
case-sensitivity at any stage of the compile, but the reality is that
TRUE/True/true covers 99% of uses, and a static analyzer can
*trivially* find those other cases prior to an upgrade.  Heck, 3
minutes with a token_get_all() script can find 'em, even produce a
rewrite diff if you're so inclined.

Nevermind, make that +1.  The ease of auditing mixed-case uses makes
supporting it in the compiler not worth the maintenance.

-Sara

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

Reply via email to