On Mon, 2003-02-03 at 15:41, George Schlossnagle wrote: > On Monday, February 3, 2003, at 03:20 PM, Harald Radi wrote: > > > Hrmfpsd, > > > > while commiting a new functions the parameter parsing API i appearently > > brought up a discussion about the meaning of life and stuff :) As > > asked by > > Andi i'm bringing the discussion to php5-dev with a short summary: > > > > andrei's point: > > extensions should stick to either functional or oo API > > PEAR wrappers can be provided > > > > my point: > > extensions should expose both APIs (if desired) > > can be done by aliasing functions to class methods -> no duplicate c > > code > > when called as function -> print warning > > when called as method -> throw exception > > > > What do you guys think of this ? > > I like your method. I've implemented it for a coupe extensions (except > for the exception vs. error thing), and I found it to be quite > manageable and very little work.
Needless to say (it was implemented in adt quite awhile ago), I think this is the better way. In any event, I don't see the downside to adding this api: Whomever wants to use it can take advantage of it, those who think its stupid, don't need to use it. -Sterling -- "Programming today is a race between software engineers stirring to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning." - Unknown -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php