Re: [RFC] Reclassifying engine warnings
| From: | Stanislav Malyshev | Date: | Thu, 12 Sep 2019 21:51:33 +0000 |
| Subject: | Re: [RFC] Reclassifying engine warnings | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-107025@lists.php.net to get a copy of this message | ||
Hi!
> FTR this is basically what Python does via defaultdict:
>
> https://docs.python.org/3/library/collections.html#collections.defaultdict
>
> I think it is the "cleanest" solution to this problem overall. Though it
> does need a separate structure, rather than our favorite PHP array.
This is one of the most annoying quirks of python - that you have to use
special package to do simplest tasks like counting anything by key or
write annoying boilerplate code that reminds python that counting starts
with 0. Now strictness zealots want to bring that into PHP. If I was a
person to do that, I'd definitely write a long "python sadness" text and
that would feature there prominently, but I don't have time to do that
so I just note that now, that it is very sad that the annoying quirks of
python are brought into php apparently because more strict is always
better.
--
Stas Malyshev
smalyshev@gmail.com