Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70565 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60698 invoked from network); 9 Dec 2013 18:25:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Dec 2013 18:25:42 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.53 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 74.125.82.53 mail-wg0-f53.google.com Received: from [74.125.82.53] ([74.125.82.53:61521] helo=mail-wg0-f53.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C9/01-55888-62B06A25 for ; Mon, 09 Dec 2013 13:25:42 -0500 Received: by mail-wg0-f53.google.com with SMTP id k14so3848700wgh.20 for ; Mon, 09 Dec 2013 10:25:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=cvIZUmydF7ruXNMP9b3HmBBaSISni/wYGx2BEVX/2Y0=; b=CE0MHTHcEy236G9hfR5v+CsvZBc4ldKaOJr4SCQxtBGsoRMjGXgTNbAjtw7RJEVWSd 77dDLJo1HPy6obGfL9nbt6QaosjmbAkP1KbZrV+F+UspvhvzVnxttp41jrBfb31RF6s6 Cxc9Vf28TgrPwGEhYjLMClxQuVtSAgBbDR2w9fMLu/zwtQJr6v+8yvDcDXko1k6qXsP2 Zo/3uKPDxXAgzgOEznCo6jD5xdACEBh+qU5y+EAsjR1CbWSEk994oEp/jJbw0U0LmkD1 m/Z20n9DdNz5yfnkVbHye1Ik3c6iJ9Nwuw9j4VdPb0iPMNlFm4D/thKw26ZcjYHNnzyF KYDQ== MIME-Version: 1.0 X-Received: by 10.180.183.72 with SMTP id ek8mr15482568wic.49.1386613539504; Mon, 09 Dec 2013 10:25:39 -0800 (PST) Received: by 10.227.7.2 with HTTP; Mon, 9 Dec 2013 10:25:39 -0800 (PST) Received: by 10.227.7.2 with HTTP; Mon, 9 Dec 2013 10:25:39 -0800 (PST) In-Reply-To: References: Date: Mon, 9 Dec 2013 19:25:39 +0100 Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: multipart/alternative; boundary=001a11c3556e768b5104ed1e1fe4 Subject: Re: [PHP-DEV] [VOTE] Allowing use of exceptions in the engine From: pierre.php@gmail.com (Pierre Joye) --001a11c3556e768b5104ed1e1fe4 Content-Type: text/plain; charset=UTF-8 On Dec 9, 2013 8:09 PM, "Nikita Popov" wrote: > > On Mon, Dec 9, 2013 at 4:39 PM, Pierre Joye wrote: >> >> I do not mind having it in 5.x or 6. but I do mind introducing >> exceptions in the core without defining what we want. Baby steps are >> nice but where do we stop at this stage then? Can we use exceptions in >> extensions as well? Or in other parts of the engine? This is a very >> good move forward but also a very critical move. We need to clarify >> how we do it, where it can be done, naming or how we want them >> exactly, etc. >> >> That's why I can't vote yes with this exact proposal (and its state). > > > Is there something particular that you would like to have clarified or specified? I tried to keep the scope narrow - only engine and only fatal errors, but if you wish to have stricter specification on some parts, please say so. I would prefer to see introduce exceptions in the whole core and clearly define how we want them or where. Adding very good documentation is also a requirement (see Zeev's reply). Not doing may lead to half backed support with everyone doing its little sauce and will end as a big mess. We should avoid that. > About your particular questions: > > > > Can we use exceptions in extensions as well? > This RFC is only about the engine - it does not affect our standard library exts. The rules there stay the same: Functions throw warnings/notices, methods may throw exceptions. Right, everyone does his thing and it is not confusing and inconsistent. Let solve the whole thing instead of a rather limited and not so useful. > > > Or in other parts of the engine? > What do you mean by "other parts"? I'm referring to the Zend engine as a whole, though primarily the executor, because converting compile-time errors will require more careful planning. As of other errors, functions, operators, etc. Cheers, Pierre --001a11c3556e768b5104ed1e1fe4--