On 16/11/16 00:06, Guy Marriott wrote: > I think it would make more sense for typed properties to exist first, and > it so happens that there was a recent RFC for this: > https://wiki.php.net/rfc/typed-properties. That RFC failed by a very small > margin. > > I would suggest you read through the discussions on the mailing list > regarding that RFC for some common arguments to typing in PHP.
It really does feel that it's time for a complete split between the simplicity that PHP has traditionally provided by NOT requiring everything is tied down in the straight jacket of 'strict typing' and a version of PHP that only works for that style of user. Things like 'function overloading' and 'int $b = 5;' do not simplify anything if you are using PHP to get away from the 'annoyance' of having to worry just how '5' was supplied. That it is an integer is only a small part of verifying if it is actually a valid input and handling mistakes or even hack attempts are not solved by simply throwing out of line errors due to a different style of working. Simply adding a range check on an input keeps the fault in the right place and perhaps allows 'five' to be responded to with a correct response ... What is STILL needed even if you make PHP only strict is a proper validation of the data contained in those 'restricted' pots ... and I include validation that an in variable is 8, 16, 32, 64 and today even bigger which is where the need for strict typing originated, and function overload to handle a multiple of fixed variable sizes. -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php