On 05/12/2016 01:50 PM, Lester Caine wrote:
> On 12/05/16 12:39, Michael Wallner wrote:
>> On 12/05/16 13:36, Lester Caine wrote:
>>>> On 12/05/16 11:21, Davey Shafik wrote:
>>>>>> E.g. the behavior of passing executing with a null value for the
>>>>>> argument is something you should be consciously making a decision on,
>>>>>> and passing in null explicitly.
>>>> I was actually getting the logic wrong... the problem with this proposal
>>>> is that I HAVE to add the '?' for many of my libraries to continue to
>>>> work simply because they do handle the null case. So what was a working
>>>> system is broken by this change.
>>>>
>> So you already have function foo(Foo $foo = null)?
>> No need to change anything.
> To be honest I don't know ... *I* would not necessarily add '= null'
> because that is the default case anyway ... I'm not sure fromthis
> 'little change' just what the full knock on effect is to code that goes
> back 15 years?
you don't need to add '= null' or '?' anywhere. function that already
accepts
null arguments (either because it's untyped or because there is '=
null') will
continue to accept without any changes

adding '?' will make the function more permissive. not adding it will
not make
any existing function more restrictive
>

-- 
Mathieu Rochette

Reply via email to