Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:83284 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49427 invoked from network); 20 Feb 2015 10:09:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Feb 2015 10:09:18 -0000 Authentication-Results: pb1.pair.com header.from=inefedor@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=inefedor@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.180 as permitted sender) X-PHP-List-Original-Sender: inefedor@gmail.com X-Host-Fingerprint: 209.85.217.180 mail-lb0-f180.google.com Received: from [209.85.217.180] ([209.85.217.180:36121] helo=mail-lb0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 33/5A-25547-DC707E45 for ; Fri, 20 Feb 2015 05:09:18 -0500 Received: by lbvp9 with SMTP id p9so5327743lbv.3 for ; Fri, 20 Feb 2015 02:09:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:to:subject:references:date:mime-version :content-transfer-encoding:from:message-id:in-reply-to:user-agent; bh=0r9qc9yhhYTCz1RpfAwqAz0H+oMG1D0R8NQfpKLyXIc=; b=LM2apvnKCPY81YN6ioyCwGS2TClzEWObYw9fPBvryY06nHMed1KcnIOMNdeKYgAY4O V7ZGxdlNyd+IpqLjzBiK8nhbiGRarA/EZhsMEY0qi+f5UWG383459s7Amy68XvUtaN7d mH2se473KSS1ZVP5/ibcrvf4lUa/BofJnp97aRAwTlhaSnqVyzlBimnV2ydtwEAVJu+c jGxCk3ka0srJlBoOXdsWE2Np4CxaZqbTGo5tnviOAVHdjpzC+Ao/VnbtMPKdoOXLrQXJ JPorAdZGVlj2rfQNmseoMwtj180TIiCqOalgLIqhS4ebUGvoalgVJPRw4zTzxlBx915h iS6Q== X-Received: by 10.152.87.3 with SMTP id t3mr7850855laz.19.1424426954476; Fri, 20 Feb 2015 02:09:14 -0800 (PST) Received: from nikita-pc ([89.250.5.98]) by mx.google.com with ESMTPSA id pf1sm943302lbc.32.2015.02.20.02.09.12 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 20 Feb 2015 02:09:13 -0800 (PST) Content-Type: text/plain; charset=koi8-r; format=flowed; delsp=yes To: internals@lists.php.net, "Tony Marston" References: <54E12349.7070806@gmail.com> <16.9B.05176.AE1C1E45@pb1.pair.com> <54E1C993.1070609@gmail.com> <37.20.01961.31113E45@pb1.pair.com> <54E32CAA.5030600@gmail.com> <54E4FAC2.7060200@gmail.com> <47.89.25547.DD007E45@pb1.pair.com> Date: Fri, 20 Feb 2015 13:09:20 +0300 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Message-ID: In-Reply-To: <47.89.25547.DD007E45@pb1.pair.com> User-Agent: Opera Mail/1.0 (Win32) Subject: Re: [PHP-DEV] [RFC] Exceptions in the engine From: inefedor@gmail.com ("Nikita Nefedov") On Fri, 20 Feb 2015 12:39:33 +0300, Tony Marston wrote: > > I disagree. Exceptions were originally invented to solve the > semipredicate problem which only exists with procedural functions, not > object methods. Many OO purists would like exceptions to be thrown > everywhere, but this would present a huge BC break. If it were possible > get these functions to throw an exception ONLY when they are included in > a try ... catch block then this would not break BC at all. > Tony, first of all - this still breaks BC, because exception is being thrown in a place where it used not to be... When some function's result heavily depends on the context it makes said function much harder to reason about. And creates mental overhead for those who'll have to read the code with this function. And again, if you need exceptions for fopen please consider using SplFileObject.