Re: Re: Named arguments revisited

From: Date: Thu, 12 Jan 2006 15:22:25 +0000
Subject: Re: Re: Named arguments revisited
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-21487@lists.php.net to get a copy of this message
Aidan Lister wrote: > As useful functions tend to increase in complexity over time, often so > does the number of parameters. > > It soon gets to the point where function calls look like: > foo(true, false, false, false, false, true) > The rest of the parameters being required to be supplied, with their > default value, when the user is only interested in changing the last > option. > > Sure, you can fall back to associative array parsing. However, I feel it > lacks the rigor that named parameters can give. Named parameters also > give a clean method for the user to see the available options, rather > than reading through source code. What exactly do you find lack about associative arrays? Ilia

« previous php.internals (#21487) next »