Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:8185 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71640 invoked by uid 1010); 26 Feb 2004 20:44:53 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 71586 invoked from network); 26 Feb 2004 20:44:53 -0000 Received: from unknown (HELO hyperion.gravitonic.com) (67.161.35.64) by pb1.pair.com with SMTP; 26 Feb 2004 20:44:53 -0000 Received: from hyperion.gravitonic.com (localhost [127.0.0.1]) by hyperion.gravitonic.com (8.12.8/8.12.8) with ESMTP id i1QKig1U003964; Thu, 26 Feb 2004 12:44:42 -0800 Received: (from andrei@localhost) by hyperion.gravitonic.com (8.12.8/8.12.8/Submit) id i1QKieaJ003962; Thu, 26 Feb 2004 12:44:40 -0800 X-Authentication-Warning: hyperion.gravitonic.com: andrei set sender to andrei@gravitonic.com using -f Date: Thu, 26 Feb 2004 12:44:40 -0800 To: Philip Fletcher Cc: internals@lists.php.net Message-ID: <20040226204440.GB3900@hyperion.gravitonic.com> Mail-Followup-To: Andrei Zmievski , Philip Fletcher , internals@lists.php.net References: <20040226160254.4324.qmail@pb1.pair.com> <1051368455281.20040226204516@marcus-boerger.de> <20040226200755.99362.qmail@pb1.pair.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040226200755.99362.qmail@pb1.pair.com> User-Agent: Mutt/1.4.1i Subject: Re: [PHP-DEV] Iterator Class/foreach Logic Flaw? From: andrei@gravitonic.com (Andrei Zmievski) On Thu, 26 Feb 2004, Philip Fletcher wrote: > Thanks Marcus > > Looking at the documentation, the comments and method name (for hasMore()) > do not have the same meaning - the comment is saying 'does the current > element exist?' and the method name says 'are there any more elements?'. > > This makes the api very ambiguous - hasMore() and isValid() have very > specific meaning in many languages wrt iterators. I agree. The semantics are fairly different. Let's not confuse them. -Andrei "This isn't right. This isn't even wrong." -- Wolfgang Pauli