Re: Renaming "strict types" to "scalar type coercion"

From: Date: Wed, 19 Jun 2024 16:14:20 +0000
Subject: Re: Renaming "strict types" to "scalar type coercion"
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On Wed, Jun 19, 2024 at 5:43 PM Sebastian Bergmann <[email protected]> wrote:
>
> Am 19.06.2024 um 17:34 schrieb Larry Garfield:
> > Also, as someone who does put every file into strict mode as a matter of course, and
> > appreciates the many languages that do not even have a concept of non-strict mode (like Go or Rust),
> > I really don't appreciate the backhanded comments in this thread about people who, you know,
> > care about type safety.  (Something that weak mode, when it was introduced in PHP 7, only marginally
> > provided if at all.)  Strict mode prevents bugs, full stop, and we should not fault anyone for
> > applying that bug-stopper tool liberally.
>
> What Larry and Gina said.

Strange, I don't have an email from Larry! But I suspect it will show
up eventually... I look forward to it!

I'll go ahead and risk an out-of-context reply, but FWIW, it goes both
ways :) People get irrational about this topic, either for-or-against.

In any case, there is not any "type safety" in PHP because PHP doesn't
know something is the wrong type until runtime. Further, it clearly
doesn't stop bugs, otherwise we'd all be out of a job by now.

Robert Landers
Software Engineer
Utrecht NL


Thread (28 messages)

« previous php.internals (#123682) next »