Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97132 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82443 invoked from network); 22 Nov 2016 21:56:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Nov 2016 21:56:54 -0000 Authentication-Results: pb1.pair.com header.from=netmo.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=netmo.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.42 as permitted sender) X-PHP-List-Original-Sender: netmo.php@gmail.com X-Host-Fingerprint: 74.125.82.42 mail-wm0-f42.google.com Received: from [74.125.82.42] ([74.125.82.42:36261] helo=mail-wm0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 01/9C-06373-32FB4385 for ; Tue, 22 Nov 2016 16:56:54 -0500 Received: by mail-wm0-f42.google.com with SMTP id g23so48502177wme.1 for ; Tue, 22 Nov 2016 13:56:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=7df4QZuGAMTG5Z8fSeLF+2al7KPdKu+Y/7+fln9igNI=; b=zQeCU9uSLmlISShusp2pw548g4EoCprAoj6viVeAu8Ufr1pbMVQf3nq43RlFLn9z+I 6jxPXCnSO7v/5BGRfNg4q5yM35RcnGQoEo+U0wLGUoG3g7C8yOyfogJt/hd30hQIPepl 4cLIEFDB8Bucl7Rp1u+R5BaHFk93MJAy69WRf3OenIFTPCsUg2+ypnkrLhXDM1c+XBxf Selsn+bBU0VMloOoS/XcZYFGFLb5AuAy3XfBPgj9NTpTAx83uJM5kb9MFvygZ/pAWkpH jICHTIwpKkbeuA2B8u6U4ZMXCxA1xnd0UQqlh86v3tlWpZ+eCPyWE31KQuV0QGOK9Ptr JiYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=7df4QZuGAMTG5Z8fSeLF+2al7KPdKu+Y/7+fln9igNI=; b=f3XQy9ZmMqiaKMSrt+77iIeCY90Xj5q1uoayviA/OkutsnIp7jggKR72+xN7Qv1v80 pLpCnSfr+BR2NDLczR2mI+IrtIpCOcsrJyzF3n1qKU0Mq29rqIcX2YQBROf7rQAi8qzI 740cT5iTa+UGXOgO1+Pt19ekEalXbQ1rN8cTWHgvJ4P6STR17Q9eaxPt5U4RYICCsDaE p0bnbZ76S9cF1p1jOi2GWZGhEtaN5vHmPdz3T4T97NLTCa2MJKmfYLVIP6ZvyIwjA3PQ rGPAs2CEVxafL2s7qKX2188jtctzxAWIQaA7xz+y8CwC77d0GhrpI5l944j8YH1reg1U Qm8A== X-Gm-Message-State: AKaTC03H7+AV3LlvuC1I8rdv+aL7oivW3wj8ePUJ9Swj8qg35URQShFGJndAiimJFzzRLM1xVj2+7l68jiaoNg== X-Received: by 10.46.77.88 with SMTP id a85mr12548990ljb.40.1479851808629; Tue, 22 Nov 2016 13:56:48 -0800 (PST) MIME-Version: 1.0 Received: by 10.114.14.6 with HTTP; Tue, 22 Nov 2016 13:56:47 -0800 (PST) In-Reply-To: References: Date: Tue, 22 Nov 2016 22:56:47 +0100 Message-ID: To: Nikita Popov Cc: PHP Internals Content-Type: multipart/alternative; boundary=94eb2c1abb4a5fa8c40541ead991 Subject: Re: [PHP-DEV] [RFC] ArrayIterator improvements From: netmo.php@gmail.com (Wes) --94eb2c1abb4a5fa8c40541ead991 Content-Type: text/plain; charset=UTF-8 I have decided to go with that because 1- I'm a fan of using Exceptions (mostly) for exceptional error conditions; between these two public seekKey($key):void throws WhateverException; public seekKey($key):bool; I (by far) prefer the latter. 2- I think it would require a new type of SPL Exception, because none of the existing makes sense to use here, in my opinion. 2016-11-22 21:43 GMT+01:00 Nikita Popov : > On Tue, Nov 22, 2016 at 6:47 PM, Wes wrote: > >> Greetings again PHPeople, >> >> I wanted to avoid the discussion for the small improvements I was >> proposing >> thinking it would be acceptable to do so ( >> http://news.php.net/php.internals/97118) but apparently I was wrong >> (sorry >> for that), so here's the discussion thread! >> >> https://wiki.php.net/rfc/arrayiterator-improvements >> >> Again this is my first RFC, and I hope I'm doing nothing wrong this time >> :P >> >> Thanks again, >> Wes >> >> (and special thanks to Room11 for their feedback about the RFC process) >> > > What's the reason for making seekKey() return a boolean? The existing > seek() method throws an exception if the seek offset does not exist. It > would make sense to me for seekKey() to throw an exception if the key does > not exist, to keep things consistent. > > Nikita > > --94eb2c1abb4a5fa8c40541ead991--