Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70555 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42929 invoked from network); 9 Dec 2013 16:22:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Dec 2013 16:22:43 -0000 Authentication-Results: pb1.pair.com smtp.mail=zeev@zend.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=zeev@zend.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain zend.com from 209.85.215.50 cause and error) X-PHP-List-Original-Sender: zeev@zend.com X-Host-Fingerprint: 209.85.215.50 mail-la0-f50.google.com Received: from [209.85.215.50] ([209.85.215.50:61596] helo=mail-la0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AA/80-40251-15EE5A25 for ; Mon, 09 Dec 2013 11:22:42 -0500 Received: by mail-la0-f50.google.com with SMTP id el20so1733763lab.37 for ; Mon, 09 Dec 2013 08:22:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:references:in-reply-to:mime-version :thread-index:date:message-id:subject:to:cc:content-type; bh=nqhoVMEVqKbRQTYz0+s/PnOGeJG4PIh261FjdmuqRxU=; b=QRzQz3cFJu9mJM7dgDHkND3lW+pzjSqwsp2JSSc7YvKe0h+FJEYlJqll+oUpf8UJX2 r8cdiFniFD0T3FFTdZq/O3Kdyge/ryciht9/aEpQ0xeDRkSbacLltKSNljr4frkIk207 Jlsj3GdktbKvKkddd1sI04ZcEzk17G89U7QViD1RQChpcbMCLATQLLz09pRFhkWfAke2 HuU4JwLySzUNWrF0oouH/ocM3ma3U29f4DX3Hyy6MojoHagLzN49/tbA8DSzWnOxQWvH WtEOThM/4eYbOURoSTfYDuK7WJheouTEsT+4fjel4tg7EdP9Qr5uboXkPIP3gf5fZvv1 x0ZQ== X-Gm-Message-State: ALoCoQk4OBXK5BcFbbUljv/hNv6UlWLS0Z4X5Shervj+x+acRH1zDAiCMkIAXv8n5wVSx3DYneN4pMuuwjJ+/5CzoiGBxtdBu70OzYyp79ycm1haGmtV3+8fUSkLne3+xwa3pkXmYl9q X-Received: by 10.152.2.165 with SMTP id 5mr1792244lav.70.1386606157956; Mon, 09 Dec 2013 08:22:37 -0800 (PST) References: In-Reply-To: MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQGgDrPA5ha5cbTVFKdEKPSDNh1cIQHg5+i/AZVf/98CLfeT+QMA73L8AgmUJjMB6prLAgH3vPq3mjVNO7A= Date: Mon, 9 Dec 2013 18:22:37 +0200 Message-ID: <6dc040b1d4917ab616951694d3f37575@mail.gmail.com> To: Philip Sturgeon Cc: PHP internals Content-Type: text/plain; charset=UTF-8 Subject: RE: [PHP-DEV] [VOTE] Allowing use of exceptions in the engine From: zeev@zend.com (Zeev Suraski) > Right, you can absolutely live a full and healthy life in PHP using entirely > procedural code (things like the dual interfaces for MySQLi ensure that) but I > really really do not see "here is an object, try/catch/finally or > EngineException" as "forcing OO concepts on non-OO people" because it > isn't. The user does not need to worry about propogation rules unless they > start writing their own exceptions and try/catch/finally is not inherently OOP. > Even if it was the average procedural user is just going to see the difference > of "Fatal Error you code is screwed" changing to "Uncaught Engine Exception > your code is screwed" if they don't want to bother catching anything, which > they wouldn't if they didnt want to use try/catch... so the whole thing is a bit > of a non-argument. Our implementation of exceptions is very much OO, borrowed from Java (which in turn borrowed a lot from C++). You need to understand a fair bit and know some extra syntax to exceptions properly, even if you don't write new exception classes. We can agree to disagree though, I don't think we'll change each other's mind :) > I know it is not your main concern, but I really don't want this argument > being used as one against this RFC in general. For me it is an argument. Instead of being able to handle these errors in the same way they handle all other errors, now they have to learn new syntax and concepts. I see no reason to change the status quo, which allows those who want exceptions to easily convert errors to thrown exceptions, into a state where those who don't want to use exceptions are forced to use them. Again, it's entirely fair that we disagree... Zeev