bdw429s
06/02/2022, 10:10 PMargumentCollection
with not all args supplied
⢠named arguments were used
⢠full null support is enabled
https://trycf.com/gist/b5724b0207694e00ed506327a066332d/lucee5?theme=monokaibdw429s
06/02/2022, 10:11 PMarg2
is null, meaning the default value didn't kick in.bdw429s
06/02/2022, 10:12 PMnull
is more of a proper and "acknowledged" value when full null support is enabled, but when I saw named params and positional params behaved differently, I wasn't so sure.Gareth
06/02/2022, 11:02 PMGareth
06/02/2022, 11:02 PMGareth
06/02/2022, 11:03 PMbdw429s
06/02/2022, 11:10 PMAdam Cameron
but when I saw named params and positional params behaved differentlyI think this nails it as a bug. I see where you were coming from initially, but something is off if the two ways of specifying the function arguments differ.
dswitzer
06/03/2022, 11:58 AMnull
and undefined
in a scripting language like JS have always made sense to me (and I know that's contrary to what a lot of devs think). I see null
as a way to say "I'm aware of this variable, but I have no idea what it's value should be" and undefined
is saying "What? I've never heard of such a thing".
In this case, arg2
isn't null
it's undefined
. It was never defined in the arguments and has no default value.Adam Cameron
(and I know that's contrary to what a lot of devs think). I seeI don't know a single dev who doesn't think this. Except some muppets from the dark history of CFML, I mean.as a way to say "I'm aware of this variable, but I have no idea what it's value should be" andnull
is saying "What? I've never heard of such a thing".undefined
Adam Cameron
dswitzer
06/03/2022, 12:33 PMAdam Cameron
dswitzer
06/03/2022, 12:34 PMAdam Cameron
dswitzer
06/03/2022, 12:34 PMnull
from that time period.dswitzer
06/03/2022, 12:34 PMAdam Cameron
Adam Cameron
Adam Cameron
bdw429s
06/03/2022, 5:33 PMbdw429s
06/03/2022, 5:39 PMdswitzer
06/03/2022, 5:53 PM