[wp-hackers] Returning instead of echoing

Ryan Boren ryan at boren.nu
Tue Nov 9 01:38:06 UTC 2004


On Mon, 2004-11-08 at 20:27 -0500, Mark Jaquith wrote:
> Ryan Boren wrote:
> 
> >I personally prefer adding get_*() functions.  As for passing in arrays,
> >I'd rather not require that in the templates, even with the assistance
> >of compact().  As Matt mentioned last time this came up, we use the URI-
> >like syntax that can be fed to parse_str() when we want to pass in a
> >bunch of named arguments.
> >
> >Ryan
> >
> Any word on how the bevy of additional functions will affect 
> performance?  My initial thought is that since the "get_" version will 
> do the hard work, and the regular version will just echo its output, it 
> shouldn't have much of an impact... but I am admittedly new to this.

My feeling is that it won't make a notable difference, but we should
profile any changes to make sure.  Also, we need to set some API policy
regarding wp_, the_, get_, etc.  Michel had some thoughts on this, I
believe.  Perhaps Matt will chime in once he has furniture to sit on.

Ryan





More information about the hackers mailing list