Re: [PHP-DEV] STH and the 3 RFCs

2015-03-16 Thread Lester Caine
On 16/03/15 11:54, David Muir wrote: On 14 Mar 2015, at 6:41 am, Lester Caine les...@lsces.co.uk wrote: On 13/03/15 18:53, guilhermebla...@gmail.com wrote: By considering PHP's nature, having a dual mode is a WTF. I can see myself asking multiple times a day is this file strict or

RE: [PHP-DEV] STH and the 3 RFCs

2015-03-16 Thread Thomas Punt
Hey David, A library written in weak or strict mode will have no bearing on its public API. Strictly speaking (pun intended), this is not true. A library can easily expose a facade that enforces a user of that library (who is in weak mode) to have to write in strict mode [1]. Once more, this

Re: [PHP-DEV] STH and the 3 RFCs

2015-03-16 Thread David Muir
On 14 Mar 2015, at 6:41 am, Lester Caine les...@lsces.co.uk wrote: On 13/03/15 18:53, guilhermebla...@gmail.com wrote: By considering PHP's nature, having a dual mode is a WTF. I can see myself asking multiple times a day is this file strict or not? to trace potential bugs or type

RE: [PHP-DEV] STH and the 3 RFCs

2015-03-16 Thread Thomas Punt
No, your example would blow up regardless of the caller being in strict mode or weak mode. That was the point in my hypothetical example - the library can decide what mode it wants the user to use (strict or weak) if it wants to. -Tom -- PHP Internals -

Re: [PHP-DEV] STH and the 3 RFCs

2015-03-16 Thread Pádraic Brady
Hi Thomas, On 16 March 2015 at 20:51, Thomas Punt tp...@hotmail.co.uk wrote: No, your example would blow up regardless of the caller being in strict mode or weak mode. That was the point in my hypothetical example - the library can decide what mode it wants the user to use (strict or weak)

Re: [PHP-DEV] STH and the 3 RFCs

2015-03-16 Thread Dennis Birkholz
Hi Thomas, Am 16.03.2015 um 15:33 schrieb Thomas Punt: A library can easily expose a facade that enforces a user of that library (who is in weak mode) to have to write in strict mode [1]. Once more, this can be done unintentionally [2] because of the caller-deciding semantics. These examples

Re: [PHP-DEV] STH and the 3 RFCs

2015-03-16 Thread David Muir
On 17 Mar 2015, at 1:33 am, Thomas Punt tp...@hotmail.co.uk wrote: Hey David, A library written in weak or strict mode will have no bearing on its public API. Strictly speaking (pun intended), this is not true. A library can easily expose a facade that enforces a user of that library

Re: [PHP-DEV] STH and the 3 RFCs

2015-03-13 Thread Lester Caine
On 13/03/15 18:53, guilhermebla...@gmail.com wrote: By considering PHP's nature, having a dual mode is a WTF. I can see myself asking multiple times a day is this file strict or not? to trace potential bugs or type juggling. I do want strict, but I don't think it's the right time for PHP to