On 14 June 2018 at 17:16, Alice Wonder <al...@librelamp.com> wrote:

>
> Should declare(strict_types = 1) do that?
>
> I haven't tried, but I would think it should.



No, it doesn't, and shouldn't. "strict_types" actually means
"non_coercive_scalar_type_hints"; it's a very specific feature, controlling
a specific set of situations, not a catch-all "strict mode" for anything
type-related.

I suppose we could have a new directive that magically changed the default
for the "strict" parameter of array_search, et al. But if that converted
switch, would it also convert == itself? And then would we need a new
syntax for "opting out" and using the loose comparison? Would the resulting
confusion of people not seeing which mode a file was in be worth it?

This is exactly why I think the word "strict" should be avoided at all
costs; it's just far too ambiguous.

Regards,
-- 
Rowan Collins
[IMSoP]

Reply via email to