Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:90390 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5256 invoked from network); 8 Jan 2016 19:02:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Jan 2016 19:02:00 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.46 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.46 mail-wm0-f46.google.com Received: from [74.125.82.46] ([74.125.82.46:38621] helo=mail-wm0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 09/D9-55593-8A700965 for ; Fri, 08 Jan 2016 14:02:00 -0500 Received: by mail-wm0-f46.google.com with SMTP id b14so185310507wmb.1 for ; Fri, 08 Jan 2016 11:02:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:references:from:to:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=R0zyxvu+vZx0hvQfUhbzuZlCUbR2/SFkfPnR89PaEcY=; b=Zo/R/CKqlciudDzXvFB44KP4R55h2EDKsf5sbH31LVAl3ywT6amYqrzEyCPZ8HLRX9 DEP21nL4YHJVXU3S7TeV8ohNtsNInASIhB9qgBysTA2r0QQgu8EJZ9Y5syiNxQvgAp5f N93X4CHpMgEab0QqOi6KCwYdU5NcpBqBetx2DjzmGHu4ppDiETAON7u1PMcCT1tnbo+h 1XlPUxmc6ryxsVs4P4CoxBDv3NGSON9q2fp+r6kRtNUyDusjsWmqYrDF/Cnl2FJy96uV sC8uWtGSJpUjpN7dxq2uYXXufHgdrQ9TIjK9qZjbKbT6lm6vE0ZZZBMcG+8EzbCKBWR4 C2ug== X-Received: by 10.28.136.148 with SMTP id k142mr459280wmd.41.1452279717391; Fri, 08 Jan 2016 11:01:57 -0800 (PST) Received: from [192.168.0.137] ([93.188.182.58]) by smtp.googlemail.com with ESMTPSA id c15sm405317wmd.19.2016.01.08.11.01.56 for (version=TLSv1/SSLv3 cipher=OTHER); Fri, 08 Jan 2016 11:01:56 -0800 (PST) References: <568FDA4B.60005@gmail.com> <568FE92D.4090001@gmail.com> To: "internals@lists.php.net" Message-ID: <5690073A.1010501@gmail.com> Date: Fri, 8 Jan 2016 19:00:10 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Deprecation of the Error Control Operator (@ symbol) From: rowan.collins@gmail.com (Rowan Collins) Dan Ackroyd wrote on 08/01/2016 18:44: > You're suggesting that we solve a problem in a way that pretty much > every other attempt to do has failed. I'm not sure where you got the idea that I was suggesting anything of the sort. > it's only by > encountering all of the small problems that you can realise that > although they are not perfect, exceptions allow much nicer APIs than > error checking. I think you've completely misread what I said; here it is for reference: > I think it would be perfectly reasonable to implement a new file > handling API, which behaves like modern PHP (objects, exceptions, etc) I am advocating *for* the use of exceptions *in that particular case*. What I was saying, however, is that the question of how fopen() should signal failure is not the same question as how PHP should signal warnings. Since this discussion was about warnings, I was trying to move the discussion away from its focus on one set of APIs. > If you forget to try/catch an exception it bubble up and fatals your > program, which is much better than continuing in an unknown error > state. You're preaching to the choir here - I know exceptions are absolutely the right thing in many cases, and use them lots in my own code. I also know that they are not suited to every situation, and that "if you don't tell me otherwise, I will halt your program" is sometimes massive overkill. I think we're just talking completely at cross-purposes here; I'm not entirely sure what you thought I was advocating, but what I was actually saying is really simple: Exceptions are not the right solution to all the places that PHP currently has warnings, so a simplified catch statement ("suppress Exception") is not the right replacement for the @ operator. Regards, -- Rowan Collins [IMSoP]