Am 17.02.2015 um 12:30 schrieb Leigh:
> 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?

As the library author you will never ever notice if your library was
called in strict mode or not! And that is the point: you will not get
any gain from making all your parameters strict, you will just force the
user to cast (as Rasmus said already).

Repeating that strict mode is required from a library author's point of
view does not make it right. You always get the types you want, you just
limit the library consumer.

But you may want your code call other functions in strict mode to catch
some type errors, that is perfectly valid, I don't deny that.

Thanks
Dennis

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

Reply via email to