Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67286 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80452 invoked from network); 3 May 2013 06:34:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 May 2013 06:34:01 -0000 Authentication-Results: pb1.pair.com header.from=adamjonr@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=adamjonr@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.44 as permitted sender) X-PHP-List-Original-Sender: adamjonr@gmail.com X-Host-Fingerprint: 209.85.212.44 mail-vb0-f44.google.com Received: from [209.85.212.44] ([209.85.212.44:54220] helo=mail-vb0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FE/31-05684-95A53815 for ; Fri, 03 May 2013 02:34:01 -0400 Received: by mail-vb0-f44.google.com with SMTP id e13so1110620vbg.17 for ; Thu, 02 May 2013 23:33:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=VkgBH8YarksGMnBr8gupZ2+dKtat1DAovONeXFkeQBE=; b=YwesILaQY5uHZ1cbf3wMtRn6qxfBJIZl/4CXjXBAy4YtqOsZwHWwtJENzBjRSOp2i4 dflNX82uvRpjp1y4xFVfcUXgQbYqBUpBLwgBhQtgp2ELOOdBpti+vz+NwH/C7sXZ6NnY ev67PkvwEIYkhCvf3TJXOMIy6ugtkcMC2V/lgslbMu7R66jaRupyQXCPP5RaP3C+5PWJ aCnk2pDZamcLu7FaoqsIdKls97ZnYvvH5w/toQiPXb0hxGqP8qx5UlrzjtDxH3l0gOJT rvDTXzM/jtv40jmH9x+zCSxRhHpchofAw14EyRCgL/wwZhzIAndHMqoxJSHOkp/BZoDv CcTg== MIME-Version: 1.0 X-Received: by 10.220.192.3 with SMTP id do3mr3279349vcb.16.1367562838711; Thu, 02 May 2013 23:33:58 -0700 (PDT) Received: by 10.220.157.5 with HTTP; Thu, 2 May 2013 23:33:58 -0700 (PDT) In-Reply-To: References: Date: Fri, 3 May 2013 02:33:58 -0400 Message-ID: To: Sherif Ramadan Cc: "internals@lists.php.net" Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] A better error handling approach. From: adamjonr@gmail.com (Adam Jon Richardson) On Fri, May 3, 2013 at 2:08 AM, Sherif Ramadan wrote: > It's already possible to do so now without any modifications to the core: It was already possible to declare arrays, but the new, shorter array syntax still brings a smile to my face :) Few new language features actually add things that weren't possible before. > If the functions are wrapped to return an array we have to update the > documentation for thousands of functions as well as break user space for > millions of users. Now array_map('file',$files) has a convoluted error state > problem. This isn't as simple of a change as you're making it out to be. > I'm sure every approach has merit. The problem here is the return on > investment for implementing such a change in PHP. It's a lot of work for > very little benefit. I was speaking of user-space libraries/code. I'm not expecting all of PHP core to change. I believe making the changes to the parser to facilitating this approach in user-space code would be worth the effort, and user-space libraries could normalize the error approach as they see fit. Adam