Hi Andrea, On Thu, Jan 15, 2015 at 9:52 PM, Andrea Faulds <a...@ajf.me> wrote: > > Sure, weak typing is much poorer than strict typing for error checking. Does > that mean the user should be prevented from having the choice? > > Are you simply opposed to the idea of weak types in general? >
I am opposed to the idea of having *only* weak types, or that there's one way to rule them all. And you might argue that this RFC provides both, but it obviously only appears to do so in practice. > > Both co-existing doesn’t solve anything, if anything it makes it worse. > > People who like weak typing don’t want to have to use APIs with strict type > hints. If you’re like Zeev and believe it is fundamentally at odds with PHP, > you’ll especially dislike it. > > People who like strict typing don’t want to have to use APIs with weak type > hints. > ... and this is where we fundamentally disagree. I like both, I want to use both for different use cases and I don't see what is it that will be bad about co-existence. Any library author who wants strictness *will* force it on you, even if that means writing 3x times more code. > > I don’t care if PHP is concerned about it. I am concerned about the mess > caused by having two or three different argument type checking modes being > used within the same function. > And yes, I also want to use both weak and strict type-hints in the same function. :) >> On 15 Jan 2015, at 19:45, Marcio Almada <marcio.w...@gmail.com> wrote: >> >> Hi, >> >> I would like to call everyone's attention, specially people >> contributing directly to this RFC series, to what S.A.N just said: >> >> > Many developers PHP offers dual syntax: >> > >> > 1. Strict >> > function bar(int $num){} >> > >> > 2. Lax >> > function bar((int) $num){} >> > >> > Maybe it makes sense to put this option on the ballot if it passes a vote, >> > it will be possible to put an end to the discus? >> >> >> This idea has been **so recurrent** and yet systematically ignored by RFC >> owners. Why? I think that we need to baby step and try to approve coercive >> type declarations first and decide upon a possible stricter type check later: >> >> How a bout a reboot of what ircmax...@php.net already started in >> https://wiki.php.net/rfc/parameter_type_casting_hints for v0.3? >> >> PS: Please, let's not fall into the mindset of "if v0.2 is not a good idea >> then v0.1 instantly becomes more acceptable", we still have time to try some >> alternatives. I almost completely agree, especially with the postscript (but excluding the baby steps, although ... it's a good price to pay if we all end up happy). I believe the linked RFC was withdrawn because that's when Anthony Ferrara "rage" quit internals? My money would be on it being accepted and already running in the wild if that hadn't happened. There's no reason not to. Cheers, Andrey. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php