Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58867 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51580 invoked from network); 12 Mar 2012 11:28:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Mar 2012 11:28:03 -0000 Authentication-Results: pb1.pair.com header.from=ircmaxell@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ircmaxell@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.170 as permitted sender) X-PHP-List-Original-Sender: ircmaxell@gmail.com X-Host-Fingerprint: 209.85.213.170 mail-yx0-f170.google.com Received: from [209.85.213.170] ([209.85.213.170:35238] helo=mail-yx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F2/C4-20445-3CDDD5F4 for ; Mon, 12 Mar 2012 06:28:03 -0500 Received: by yenl5 with SMTP id l5so2722396yen.29 for ; Mon, 12 Mar 2012 04:28:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=nKkj4MKUsH7LI6/AUAGZXE2vDMVOwF3TAkdIjoTXThk=; b=xAubRP+j4nJtEKl7ndkmWCtQka6X7sO/YV0WiiL/+EyyNX9cfzu9DD+UcuI0zO+Luc BywxIdiGmdL0wiEAMd2Aimlkbd0Ryi3vcJUbEZ+aVhbAlKUkV34QXYjkRZoYfug0x2u3 EOpHlffrhcvzK1rllTkvv8YjhQpGmZ7BVxojGTzNVPsUqwh2lSjBVUSaWppB4kCap+lC JvJPXQ7OBJCQfq6hn2BbGdmG+YZAR0+74LeGFp3mKoBMl5SaqmJ9aX4rUFvf5c5lhSI3 NsCIRWzOG5zAWSi/WWohypDMh5CYbE4dxl3HqayxDegc0dVbi2vrJA8b/ZQfa/cTH9k3 SvsA== MIME-Version: 1.0 Received: by 10.229.135.19 with SMTP id l19mr2356450qct.65.1331551680410; Mon, 12 Mar 2012 04:28:00 -0700 (PDT) Received: by 10.229.49.74 with HTTP; Mon, 12 Mar 2012 04:28:00 -0700 (PDT) In-Reply-To: References: Date: Mon, 12 Mar 2012 07:28:00 -0400 Message-ID: To: Arvids Godjuks Cc: Tjerk Meesters , Lazare Inepologlou , Simon Schick , "internals@lists.php.net" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [POC - Patch] Scalar Type Hinting - A-La zend_parse_parameters From: ircmaxell@gmail.com (Anthony Ferrara) Arvids, On Mon, Mar 12, 2012 at 4:39 AM, Arvids Godjuks wrote: > I should point out that returning false on param parsing failure on the > language level is one thing (not to mention it's not ok to do that in the > first place by my taste), but forcing that behavior on the user-land leve= l > is kind'a too much. To be clear, that's not what I had meant at all. I was talking about ZPP returning false internally, not what the internal functions themselves do (it's up to them to ignore the error, to go on, or raise a different error). > Consider how the code will become much more complicated - now you have to > not only to check what you pass to the functions, but you have to check w= hat > it returns every single time (do I have to mention that false can be neve= r > returned by the function at all except when the param parsing fails?). I agree 100%. There's also a semantic difference between an error state from the function and an error state from parameter parsing. Which is why an E_RECOVERABLE_ERROR is my preferred state, since it communicates the information properly... > What is consistent and exists on the internal language layer > not=A0necessarily=A0good for the user-land. I'm kind'a surprised no one t= hought > of that. > As I said I can live with the throwing notices and warnings (and not > E_RECOVERABLE_ERROR as I personally wanted), but returning false even not > trying to run the function is just a bad idea all over the place. I'm confused. Do you not want E_RECOVERABLE_ERROR for parameter failures? Or do you, but could live with lesser as well? I didn't quite get that part... Anthony