| 
	
 | 
 Posted by Brian Kendig on 07/12/07 19:40 
On Jul 11, 8:53 am, ZeldorBlat <zeldorb...@gmail.com> wrote: 
> On Jul 10, 4:41 pm, Brian Kendig <b...@enchanter.net> wrote: 
> > Well, I don't have THAT much foresight.  I don't want to go using 
> > wrappers for every built-in PHP function on the off chance that 
> > someday I might want to extend their functionality. :) 
> 
> Why not? 
 
It adds overhead, it reduces readability and increases the chances for 
typos (what if I made a mistake in one of my wrappers?), it's 
unnecessary for the vast majority of the time, and in the rare cases 
when it *would* be useful I might decide to do something differently 
so I'd probably have to go edit large swaths of my code anyway. 
 
Putting a wrapper around every built-in PHP function just in case I 
might someday want to extend it is like wrapping every item in my home 
in bubble wrap just in case I might someday hit my head on it.
 
  
Navigation:
[Reply to this message] 
 |