> We should decide and implement whatever is decided on by beta2. > great.
> > > So how do we get a formal spec for the changes (starting with nicer names, > > > i.e. Iterator instead of spl_foreach)? :) It's probably best if you take > > > Sterling's email and try and come to a final set of interfaces and a very > > > very short explanation where relevant of what it'll do and then we can > > > aye/nay each part. > > > > > > >What's wrong with my interfaces? ;-D > > Ugly names? :) I'm not very sure about bringing things like cast > overloading into the language space but we can argue about that if/when we > have the final list. If you say what you did is final we can start with that. > Ugly names - I'm wounded. ;-) Anyhow, I've repasted them here for your criticism ;-) // Base overload interface, to allow for checks on whether or not a // object is overloaded interface Overloaded { }; // Overloaded_Value overloads the object itself, allowing you to treat // the object as a base type interface Overloaded_Value implements Overloaded { // Called when the object is directly assigned to // @return null function setValue($value); // Called when the object is cast to type a certain type // or kind-of type // valid types are :: // 'boolean' // 'integer' // 'double' // 'number' // 'string' // 'array' // @return value A value of type $type function asType($type); }; // Overloaded_Iterator allows you to overload an object, to allow // foreach () to move over the object interface Overloaded_Iterator implements Overloaded { // Move forward one element in the object // @return null function next(); // Get the value of the current object // @return zval (a PHP value) function current(); // Tells whether or not the object has more data // @return bool function hasMore(); }; // Overloaded properties allows you to overload both property // *and* array accesses. interface Overloaded_Properties implements Overloaded { // Get $property // @return zval (a PHP value) function get($property); // Set $property // @return nothing function set($property, $value); // Check whether or not $property exists // @return bool function exists($property); } // Allow you to overload method calls interface Overloaded_Methods implements Overloaded { // Catch a method call, $name is the name of the method // @return zval (a PHP value) function call($name); }; -Sterling > Andi -- "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 Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php