[wp-hackers] echo and return

Brian Meidell brian at mindflow.dk
Mon Jul 26 11:34:23 UTC 2004


Kitty wrote:

>>I had a short and confusing discussion with Mookitty and Matt on the irc 
>>channel today, and I wanted to pick it up here.
> thanks, love ya bunches too! ;)

That's not what I meant at all.
I was commenting on my own inability to follow the IRC channel, not you 
or Matts comments. On the contrary, writing from you and Matt is usually 
admirably clear.

Trying to be in a discussion on IRC where a fair number of people are 
writing, while trying to work at your dayjob at the same time is hard - 
at least for me :)

> Basically, I think all functions should return, and be left to be echoed
> via <?php echo the_function() ?>, and I never mentioned shorthand tags
> at all, just that it should be up to the file that's being served to
> echo the return value. 

I must have been mistaking - I thought it was you who wrote the 
<?=$foo?> example in the channel. As I said, torrents of text was 
ripping past my eyes and I was struggling to keep up.

> But, if that's not to be, my second choice would be to see all functions
> goto a 'url' style of passing params:
> <?php the_function('echo=true&hot=dog') ?> (some do this already) so
> that param order doesn't matter, it's all split up by 'parse' anyways.
> Another nice thing about this would be that users modding index.php
> wouldn't have to worry about param order, which would make everyone's
> life easier.

Is changing function signatures (beyond adding arguments with default 
values) really such a common problem?

I my eyes, it's a better approach to make a new function which uses the 
old one and adds the new capabilities, giving it a name that clearly 
distinguishes what it does more than the old one.

> Obviously this would be a monster of a project, and would be something
> to work on after 1.3 stabilises.

Where can I find a list of goals for version 1.3?
I'd like to pitch in.

/Brian




More information about the hackers mailing list