Re: Iterator Class/foreach Logic Flaw?

From: Date: Mon, 01 Mar 2004 14:21:41 +0000
Subject: Re: Iterator Class/foreach Logic Flaw?
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-8276@lists.php.net to get a copy of this message
Hi - Andi Gutmans wrote:
Well we don't have very much time anymore because I want to roll RC1 ASAP (assuming that we get a couple of bugs fixed which need fixing). Personally I'm fine with either of these (I don't mind hasMore()) but a decision has to be reached quickly. From discussing with Marcus I don't think he feels very strongly about it but like me doesn't think hasMore() is so bad. People are used to this semantics IMO.
Well, I think that it's confusing. I think that current users are used to the semantics, but right now it's a pretty small group using PHP5. I think that it'll be a lot harder to change something like this after release -- and I do think the current method naming is semantically wrong. Having implemented several Iterators, until now it's been a bit of a second-guess (have to go read the example in zend-engine2.php doc) every time. I think that this would be a lot clearer if it could be renamed. Clearly I don't know what is involved in renaming this method. Obviously it will break some existing code ... but it's an easy fix (since generally I assume the only code that would need to change is the implementing class) & better now then never IHMO. I know you want to roll RC1 asap -- I want that too (!) -- but I think it would be great if this change could be incorporated. Just my .02. Thanks, Hans

« previous php.internals (#8276) next »