Hi, On Mon, Feb 2, 2015 at 6:17 PM, Andrea Faulds <a...@ajf.me> wrote: > Hi Markus, > >> On 2 Feb 2015, at 14:25, Markus Fischer <mar...@fischer.name> wrote: >> >> - Since consensus on the strict mode does part the community (or, the >> greater community also outside @internals) my impression is that the >> current best way to move forward would be >> >> - get the rfc to only go for weak types for now >> - using the "cast-like syntax": function foo( (int) $bar ); >> >> and ultimately keep the strict type out for /now/ and try it at a later >> time, the "function foo( int $bar )"-syntax. > > I’m not sure that really works that well. It’s not a terribly good > compromise: If you want strict typing, you not only haven’t got it, but even > worse, you’ll be forced to deal with weak typing if you use the wrong > library, because the (int) syntax would be specifically for weak types. It’s > not really a compromise at all, actually. > >> I'm actually not really in favor of just weak types, I would consider >> myself a "strict type" voter, but through the community communication >> here I saw a) the benefits of weak types hinting/casting b) without >> getting in the way of a possible future strict type (e.g. with the >> "non-cast-like syntax”). > > Well this RFC tries to strike a different balance: rather than having the > chaos of some functions using weak types, others strict types, others both, > it just adds scalar types and lets you choose the behaviour that suits you. > It means weak typing fans can live in their weakly-typed world, and strict > typing fans can live in their strictly-typed world. That’s the idea, anyway. > > But I’m just going in circles at this point. :P >
If chaos is what you call it - we want chaos. :P Cheers, Andrey. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php