[wp-hackers] echo and return
lowmagnet
lowmagnet at lowmag.net
Tue Jul 27 16:44:52 UTC 2004
On Tue, Jul 27, 2004 at 06:26:23PM +0200, Brian Meidell Andersen wrote:
> Stephen Minutillo wrote:
>
> Just to reiterate the point and be clear:
> I am not talking about parallel functions, but rather serial functions.
> In my mind, parallel functions would be to duplicate the content of the
> function, which would be double maintenance.
> With serial functions, the echo function simply calls the returning
> function and echoes it. So there's still only one function body to take
> care of.
I previously responded to this, but my mail system lost the message by sending it as the wrong person. I like the idea of nested functions personally, but there is little difference between an echo function and a getter function, and that difference could be taken care of just as easily in the following way:
echo_the_date();
becomes
echo the_date();
So I don't think the echo function makes sense if we could have one function instead that handles both cases. Also, to have a function called 'the_date' that echoes and 'get_the_date' that gets is also odd. why give a longer name to the base 'getter' function, and leave of the mechanical implications of the 'printer' function?
I really think that one function per template action would be safer, and easier to understand.
-eli
More information about the hackers
mailing list