Re: Renaming "strict types" to "scalar type coercion"
| From: | Mike Schinkel | Date: | Wed, 19 Jun 2024 16:16:22 +0000 |
| Subject: | Re: Renaming "strict types" to "scalar type coercion" | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-123683@lists.php.net to get a copy of this message | ||
> On Jun 18, 2024, at 5:04 PM, David Gebler <davidgebler@gmail.com> wrote:
>
> On Tue, 18 Jun 2024, 17:40 Robert Landers, <landers.robert@gmail.com
> <mailto:landers.robert@gmail.com>> wrote:
> Hello internals,
>
> Many, many people start their files fairly religiously:
>
> <?php declare(strict_types=1);
>
> and I say "religiously" because from talking to people in real life,
> reddit, workplaces, etc, very few php programmers actually know what
> this does but do it nonetheless.
>
> I think there's almost certainly a degree of truth, not just in PHP but programming in
> general, in the idea that there are many people who will blindly follow a convention for no better
> reason they once heard someone they considered more senior than themselves say the words "best
> practice"
There is a notable term for that: "Cargo Cult Programming":
https://en.wikipedia.org/wiki/Cargo_cult_programming
<https://en.wikipedia.org/wiki/Cargo_cult_programming>
#fwiw
-Mike