Re: Unifying logical operators
| From: | Alice Wonder | Date: | Wed, 11 Jul 2018 02:58:02 +0000 |
| Subject: | Re: Unifying logical operators | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-102741@lists.php.net to get a copy of this message | ||
On 07/10/2018 07:20 PM, Ryan wrote:
On Tue, Jul 10, 2018 at 2:26 AM, Walter Parker <walterp@gmail.com> wrote:Using github may not be the most reliable method. Look at what is most popularly used in composer dependencies. For example, I know xor is used in PHP Codesniffer which while likely not often part of deployed code is very often a devel dependency. I think phpunit also uses xor and is also very popular. I use xor myself but my use is purely hobby (I have a pseudo-RNG written in PHP that can take any source of data, random or not, and pass it through a filter that makes it pass pRNG tests - showing that passing tests doesn't mean a random source is necessarily random enough for cryptography) Anyway as I believe you have already conceded, nuking xor would require many projects used a lot to have to change.That is a matter of style, as I find $a = func() or die more clear that the version that uses || Not chaining stuff together is a third style. This feels like a Python PEP request. By that I mean that Python wants to have only one way to do any one task. Perl style is there’s more than one way to do it. PHP has been a mix of these styles. The big question I have is how much PHP code will break due to an enforced style requirement?.As I said in the OP, out of the top 30 GitHub repositories (the first page on the API since I couldn't figure out how to get to the second), there was only one line that would require a change (and it was copy-pasted from the manual). Obviously there's no way to truly know how many times it's used in non-public code, but I'll expand my GitHub search and report back some more solid metrics.