Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:9086 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6902 invoked by uid 1010); 12 Apr 2004 19:24:17 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 6844 invoked from network); 12 Apr 2004 19:24:16 -0000 Received: from unknown (HELO longsword.omniti.com) (66.80.117.3) by pb1.pair.com with SMTP; 12 Apr 2004 19:24:16 -0000 Received: from [66.80.117.2] (helo=[10.80.116.129]) by longsword.omniti.com with asmtp (TLSv1:RC4-SHA:128) (Exim 4.14) id 1BD72X-0006SG-68; Mon, 12 Apr 2004 15:24:17 -0400 In-Reply-To: <82120D62-8CB4-11D8-932F-000A95E073A0@php.net> References: <1081740243.14476.11.camel@coogle.localdomain> <1081740243.14476.11.camel@coogle.localdomain> <5.1.0.14.2.20040412134325.039c7758@127.0.0.1> <1101B839-8C98-11D8-BB64-000A95E073A0@php.net> <26E7D27E-8C99-11D8-8792-000393B2B3C0@omniti.com> <12C1A2DA-8CA6-11D8-8792-000393B2B3C0@omniti.com> <493538C4-8CAD-11D8-932F-000A95E073A0@php.net> <3D578972-8CB0-11D8-8792-000393B2B3C0@omniti.com> <82120D62-8CB4-11D8-932F-000A95E073A0@php.net> Mime-Version: 1.0 (Apple Message framework v613) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-ID: <3FBD5CD9-8CB7-11D8-8792-000393B2B3C0@omniti.com> Content-Transfer-Encoding: 7bit Cc: John Coggeshall , Derick Rethans , Andi Gutmans , PHP Internals Date: Mon, 12 Apr 2004 15:26:08 -0400 To: Sterling Hughes X-Mailer: Apple Mail (2.613) Subject: Re: [PHP-DEV] Exceptions and Errors From: george@omniti.com (George Schlossnagle) On Apr 12, 2004, at 3:06 PM, Sterling Hughes wrote: >> >> It is. It's a hardocded portion of their app, and they made a >> mistake. They may not care, but it's also possible that they do. >> Assuming that they don't care enough to fix it seems equally crazy to >> me. >> > > Could be a version mismatch with tidy, and a newer library. They > develop there code, the option exists, and then someone with an older > version of the library doesn't have that. Whether or not i have 4 > spaces or 2 in my output is rather inconsequential. Now you deploy > somewhere else and this explodes somewhere within a function and bumps > the script out of a critical execution context and refuses to work. Setting an option has semantic meaning. Whitespace has no semantic meaning in PHP. These are apples and oranges. >> >> Rewind to the beginning of the discussion, the scope is not as broad >> as you claim. >> > > I did. fast-forward to the end of this message, that's exactly the > point john brought up. He's talking about all E_WARNINGs in an OO context, not in an OO extension. >> I could, I could also catch my exceptions. There are plenty of >> other exceptions (casting errors, etc) that will irk me whenever I >> use Python. >> > > I've probably written a considerably large amount of python and I > haven't run into this rampant exception problem you talk about. Could > also be the reason why I like Python more than you... ;) It makes > sense that overloads would cause exceptions, as it does with type > casting exceptions - remember, python is a strongly typed language, > that type schiznizzle is important to them. I'm not arguing whether it's important to them. I'm arguing that things that are not important to my app generate exceptions in Python. Something can be important in a language but not important to my app. >>> Either i'm missing the point or we are agreeing this shouldn't be so. >> >> You were saying that not doing this was consistent with other >> languages. I was saying that it was not. >> >> > > Ok, then we disagree. I think its entirely inconsistent because the > two systems don't map to each other, and you get plenty of cases where > the two simply don't map. John is talking about *all* E_WARNINGs in > OO code, and in the procedural variants, sending E_WARNINGs. The > scope of E_WARNING is not in my opinion the same scope as an exception > in any language, and we may just have to agree to disagree. The not-mapping issue is a serious one. PHP's procedural error-handling does not map well to Java or Python. PHP's OO error-handling can. The former can't change, the latter can. I don't think there's a clean answer. And before I incur a rant from Sascha about how I ramble endlessly without point, I'll resign from this argument. George