Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70553 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38695 invoked from network); 9 Dec 2013 15:58:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Dec 2013 15:58:10 -0000 Authentication-Results: pb1.pair.com header.from=zeev@zend.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=zeev@zend.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain zend.com from 209.85.215.46 cause and error) X-PHP-List-Original-Sender: zeev@zend.com X-Host-Fingerprint: 209.85.215.46 mail-la0-f46.google.com Received: from [209.85.215.46] ([209.85.215.46:59817] helo=mail-la0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C3/B1-28714-098E5A25 for ; Mon, 09 Dec 2013 10:58:09 -0500 Received: by mail-la0-f46.google.com with SMTP id eh20so1731115lab.19 for ; Mon, 09 Dec 2013 07:58:05 -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:content-type; bh=vZhW6K78pkaKwrLBY2F7AokJXgkYopy1JVgHooeachQ=; b=PX/FLK0g7GwMoHW6YqQMH7R9oe250LqZ+1HXOZ5eNfyilzr468giFtsHzqrxuq6blL 84jQXavI8DuZy46zFEPvOB9xJp18BIE/kVJI+9cRbM6z9v/bpqNkZ4Oqzmbn4nnwB6+Y MNdruSioIz/KBu1W+MR6oKjeI+TTt38L7yD9Agm6nXZO+n55tUSlyTb0GnJPJ/GeFFif dZOQbASHAHaeXdgqR4/Lpe69q2H+BhvbOF3BV0lIKv/oC0P5VYMcU6gw1ckZZmmvQX3d QGxfqnu/DtwRbmWXKRQZZR3WMroCCUzT2DvfwMefi2kWMNL9w16JhJ3/NZalgEi3iHph HD4Q== X-Gm-Message-State: ALoCoQnedQ4726dUNXdzUcMJ74fRAofKDFLGaxz60rbndAF09eG6ToZjDC6Tz4eF2/KR/PpuM84js4m+gBk/VQef8Z+tkEne/25tB8RlVoQgPbhoLiiAFqUlC8DFML5txh+juhOdJ1Je X-Received: by 10.152.197.35 with SMTP id ir3mr2764054lac.54.1386604685309; Mon, 09 Dec 2013 07:58:05 -0800 (PST) References: In-Reply-To: MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQGgDrPA5ha5cbTVFKdEKPSDNh1cIQHg5+i/AZVf/98CLfeT+QMA73L8AgmUJjOaVFmF8A== Date: Mon, 9 Dec 2013 17:58:03 +0200 Message-ID: To: Philip Sturgeon , 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) > > OK, got you. Not using exceptions in the engine was also a design > > decision (so that we don't force OO concepts on non-OO people) - need > > to think if it still makes sense and get back to the vote. > > > > Thanks! > > > > Zeev > > I think it is fair to say there is a big difference between "forcing OO concepts > on non-OO people" and which is what is being proposed > here: "this is an object which you can use if you'd like to find out what is > happening with this exception." > > No PHP developer is going to get away with not using any objects ever > regardless of their preferred design approach, so offering them exception > objects is not going to frighten anyone off. While I disagree that all PHP developers would have to use objects (you can live a full healthy procedural life in PHP) - regardless, exceptions and their jargon is a much more advanced OO concept than just using plain objects. Throwing, catching, propagation rules, try/catch/finally - those all come hand in hand with exceptions. We've made a conscious decision not to force this on users back when we introduced exceptions, and keep the engine use errors only (which can be converted to exceptions easily enough using error handlers). Note that I think that this part is debatable - I'm a lot more worried on the feedback Dmitry provided earlier today (although I admit I'm not crazy of just keeping things the way they, and letting those who are interested in exceptions convert errors to exceptions on their own). Zeev