On Mon, Feb 28, 2022, at 5:28 AM, Mark Randall wrote:
> On 28/02/2022 01:46, Craig Francis wrote:
>> Personally I think `strict_types=1` is fine for my code, but I would never
>> want to force that style on everyone, because doing so would be fairly
>> hostile for a language that's popular and well known for being easy to
>> use/learn.
>
> Magically coercing things and hiding things under the hood is useful for 
> the first 10 minutes of learning.
>
> After that it just becomes a hindrance difficult because you have to 
> know all of the secret rules about type juggling.

This needs to be called out more.  "Easy to learn" doesn't come from being 
forgiving of sloppiness.  It comes from making the non-sloppy approach 
straightforward, obvious, and if someone does do something sloppy the error 
message(s) point people toward doing it the right way.

Forgiving of sloppiness is how you gt security errors, not ease of use.

--Larry Garfield

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

Reply via email to