Re: [PEPr] Comment on Images::Image_Canvas

From: Date: Thu, 21 Jul 2005 12:40:04 +0000
Subject: Re: [PEPr] Comment on Images::Image_Canvas
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-38819@lists.php.net to get a copy of this message
I think the degree of being more error-prone with offering both alternatives is pretty small.
My experience (maybe it's just me :p) is that everything that requires a human to remember something is inevitably error-prone. I agree the "danger" is small, but it's just one more thing to remember
Hmmm.... That would be worth benchmarking, I guess. I cannot believe, that a simple "is_array()" and some variable conversion can be that expensive. Or?
I don't think that it in itself is expensive compared to the rendering stuff, my point is just that it adds some unecessary overhead.
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?).
I think that is the path I will take as well... Thanks for your input regards Jesper

« previous php.pear.dev (#38819) next »