Re: [PEPr] Comment on XML::XML_FastCreate
| From: | Guillaume Lecanu | Date: | Sat, 10 Apr 2004 15:36:55 +0000 |
| Subject: | Re: [PEPr] Comment on XML::XML_FastCreate | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-27397@lists.php.net to get a copy of this message | ||
Le sam 10/04/2004 à 14:18, Alan Knowles a écrit :
> > I think Stephan makes a very valid point. There an increasing number
> > of phpDoc aware IDE's which actually make it very convinient to use
> > parameters instead of arrays.
>
> The days .phps, cvsweb or chora does that - I'll stop going on about it ;)
> As we dont have to specify type for PHP variables - these editors are
> doing best guesses - it is feasible with functions or static methods,
> but it involves a bit of luck when it comes to an editor hinting at php
> methods..
>
> > The way you are suggesting to use arrays seems to be like a poor man's
> > parameter hinting.
> >
> > The only valid reason I see for array using is to:
> > 1) be able to easily pass a number of parameters which get generated
> > by another method
> > 2) to emulate named parameters
>
> 3) extendable (future proof)
> 4) readabilty - Without having to require a specific editor.
>
> We are writing code that is designed to be re-used as easily as possible
> by many people, it shouldnt be designing with the presumtion that you
> need a super-ide to use it..
>
> I had a look through my emense libray of really old books ;) - an
> interesting section of 'Writing Solid Code' comes out as "Make the code
> intelligible at the point of call" - Not much could be found easily on
> the web discussing this..
IMHO i think is very interresting to use an unique array parameter on
methods that requires many options.
But this question doesn't concern the XML_FastCreate package :)
Best Regards,
> Regards
> Alan