Re: String Extension Proposal

From: Date: Sat, 02 Jul 2005 19:22:53 +0000
Subject: Re: String Extension Proposal
References: 1 2 3  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-2528@lists.php.net to get a copy of this message
Sara Golemon wrote:
Also, in any case, I'd be very much opposed to such a generic name even if it's allowed in PECL.
I have as much of a distaste for OOP as the next guy, but if the code is written and someone out there *may* want to use it, I see no reason to preclude it from PECL. I agree that core is the wrong place and it needs a non-generic name, I'd offer: objString, String_Object, ooString, or a vanity name like JH_String, or something whimsical like sOOP (P_SOOP even?).
I definitely think PECL would be the place for something like this. Unless (or until) PHP moves in a more OO manner, I wouldn't see the need for it to be included in the core as it would duplicate what is available in the code already(short of the small memory savings mentioned earlier). I would take the idea a step further and create objString, objInt, objBool, etc., to wrap all the various types. Its usefulness to me would be type hinting for any of the three mentioned types. It's easier, and imho more readable, to have a "function foo(objInt $int)" than to do an if statement or an assert() to insure you've been given the proper type.
If nothing else, this extensions sounds like a wonderful example to other developers of the kinds of things that can be done with object handlers in PHP5.
I second this. This extension would be fairly straight forward and could possibly be used as some sort of tutorial on creating OO-extensions for PHP5. -Travis

« previous php.pecl.dev (#2528) next »