[PHP-DEV] STH and the 3 RFCs

2015-03-13 Thread guilhermebla...@gmail.com
Hi internals, I carefully read all 3 proposed RFCs related to scalar type hints. As an end user and enthusiast of the language, I want PHP to always improve. STH is *the* major inclusion for PHP 7 and no matter how many people say about phpng performance, STH is the one that will impact mostly eve

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

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

2015-03-16 Thread David Muir
>> On 14 Mar 2015, at 6:41 am, Lester Caine 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 juggling. I d

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 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 str

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, thi

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 exampl

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

2015-03-16 Thread David Muir
> On 17 Mar 2015, at 1:33 am, Thomas Punt 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 (who is

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 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) if it wants