[wp-hackers] function_exists - user woes

chuckg at cirkeljerk.blindmuse.com chuckg at cirkeljerk.blindmuse.com
Fri Jul 30 07:48:25 UTC 2004


Matt Mullenweg wrote:
> That's like saying "I bought these wireless speakers and put them in my 
> room but then I threw away the transmitter and now the speakers don't 
> work!" Function_exists() is not a valid solution to this problem for 
> tag-based plugins because, as Alex demonstrated, it would put the ooo in 
> oooogly. If anything what we can take from this is perhaps there should be 
> a note on the plugins page about this.

Whatever happened to the good ole, "if you're not sure if the functions 
exists yet, or likely that it does, through your first two intitials in
front of it".  I released a plugin a while back that had a
"get_year_link"
which at the moment, I wasn't sure if it existed or not.  Rather than 
messing around w/ the fuss, I just threw a cg_ in front of the function
name and voila, no problems arose.  

Can't we just add a note to the plugins page that says "don't make
stupid
generic names that ruin everyone elses well written code because you are
too lazy to come up with an original name for a general function which
is probably already built into WP in the first place!" *gah*

Out of breath.

Oh, and that still doesn't keep authors for throwing the function_exists
in front of functions that will not be directly used by the average
user.
That's what creating functions is all about, having one main function 
encompass all the little processes of others.  Just be careful, I think
is what I'm trying to say.  

chuckg

-----------------
http://www.blindmuse.com
I am who I am not who I thought I am
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : /pipermail/hackers_wordpress.org/attachments/20040730/aa622371/attachment.bin


More information about the hackers mailing list