Re: Reviving scalar type hints
| From: | Andrey Andreev | Date: | Tue, 17 Feb 2015 14:53:08 +0000 |
| Subject: | Re: Reviving scalar type hints | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-82966@lists.php.net to get a copy of this message | ||
On Tue, Feb 17, 2015 at 1:30 PM, Leigh <leight@gmail.com> wrote:
> On 17 February 2015 at 05:48, Sara Golemon <pollita@php.net> wrote:
>>>> We can sigh and tut about this not being "the PHP way", but the script
>>>> author was the one who chose to enter into a tight contract, and the
>>>> script author, not you, is the one who should have that authority over
>>>> their own application.
>>>
>>> I find this view way too extreme.
>>>
>> You find giving authority over an application to the application
>> author too extreme?
>
> And you find taking authority over a library away from the library
> author completely acceptable?
>
> If I write an API that works perfectly well in strict mode, why
> shouldn't I be able to turn strict on for my whole library? Do I just
> tell users that non-strict mode constitutes undefined behavior for
> this library, and refuse to fix any bugs that come up because of it?
>
> I'm sure I could find a way of detecting non-strict mode and throw a
> fatal, or force access through a facade/wrapper of some sort where
> I've turned on strict and made myself the caller. Isn't this equally
> unhelpful? The point is some people will want strict turned on, and
> they will find ways to force it on people. You're going to have to
> live with it, so just make it a possibility from the outset.
>
^ That. I've said the same thing multiple times already.
Cheers,
Andrey.