Re: [RFC] Skipping parameters take 2

From: Date: Mon, 02 Sep 2013 10:53:20 +0000
Subject: Re: [RFC] Skipping parameters take 2
References: 1 2 3 4 5 6 7 8 9  Groups: php.internals 
Request: Send a blank email to internals+get-68843@lists.php.net to get a copy of this message
2013/9/2 Lester Caine <lester@lsces.co.uk> > Ferenc Kovacs wrote: > >> >> you write your code where you copypaste the default value >> some time passes >> somebody changes the default value in the called function definition >> your code now calls the function with a non-default value. >> > > Actually THAT is a problem I've hit in reverse! Some bugger changing the > default in a library without understanding the consequences! In which case > the fix was to put in the 'default' I wanted ... this works either way, but > I could at least see in the IDE that the default had been changed so > tracing it did not take as long as it could have. But thats a problem no language (with default values for parameters of course) can help you, except you avoid default values in every case. I for myself always use "null" as default value, so I must say, that a special keyword doesn't bring me any benefit. In this meaning: The named parameters are more useful :) Regards, Sebastian > > > -- > Lester Caine - G8HFL > ----------------------------- > Contact - > http://lsces.co.uk/wiki/?page=**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<http://rainbowdigitalmedia.co.uk> > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- github.com/KingCrunch

« previous php.internals (#68843) next »