Re: [PEPr] Comment on Images::Image_Canvas
| From: | Lukas Smith | Date: | Thu, 21 Jul 2005 12:40:59 +0000 |
| Subject: | Re: [PEPr] Comment on Images::Image_Canvas | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-38820@lists.php.net to get a copy of this message | ||
Markus Wolff wrote:
Tobias Schlitt wrote:But even then if you have alot of optional parameters it will get pretty annoying to deal with the constant wrapping caused by endless parameter lists, half of which are optional, in function calls. moreover you end up with stupid errors if the optional parameters are not all just null and instead you sometimes have to pass true or false for parameters you dont even care about. With php 5.1 you are also getting array typehints, which atleast alleviate one common annoyance with array parameters, although they still dont cover hinting an array structure. regards, LukasThen again, for those of us who are using a real IDE instead of just a vanilla text editor, the array stuff means more typing while not offering any advantage - I'm quite used to having tooltips for the function parameters, telling me the name, type and, if available, the inline docs for the parameter that I'm about to enter. That would not be possible using a single array as the parameter.So again I think for consistency: the one or the other (whenever possible)Me personally would prefer the array stuff, since it's much easier to remember 'filledColor' and 'lineColor' instead of remembering that 'filledColor' is the 5th and 'lineColor' the 6th parameter (or was it the other way around?).