Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39280 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87294 invoked from network); 24 Jul 2008 19:39:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jul 2008 19:39:37 -0000 Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.163 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 212.25.124.163 il-gw1.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.163] ([212.25.124.163:58094] helo=il-gw1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7D/F3-22699-77AD8884 for ; Thu, 24 Jul 2008 15:39:37 -0400 Received: from us-ex1.zend.com ([192.168.16.5]) by il-gw1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 24 Jul 2008 22:40:09 +0300 Received: from [192.168.16.110] ([192.168.16.110]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 24 Jul 2008 12:40:06 -0700 Message-ID: <4888DA96.3070508@zend.com> Date: Thu, 24 Jul 2008 12:40:06 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Greg Beaver CC: Lukas Kahwe Smith , PHP Developers Mailing List , Dmitry Stogov References: <486FA5FB.1000300@php.net> <4872B5D4.1000205@zend.com> <4877CE04.4070104@chiaraquartet.net> <487F880B.2090002@zend.com> <6A0D6007-9076-466B-9AF8-018451145466@pooteeweet.org> <487F96E0.1050208@zend.com> <4887D617.2010300@php.net> In-Reply-To: <4887D617.2010300@php.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 24 Jul 2008 19:40:06.0129 (UTC) FILETIME=[12E35E10:01C8EDC5] Subject: Re: towards a 5.3 release From: stas@zend.com (Stanislav Malyshev) Hi! > b.php: > namespace Foo; > class A { > function __construct() {throw new Exception('hi');} Here in your proposal exhaustive autoload happens for all cases where you do not actually override Exception in Foo. > include 'a.php'; > include 'b.php'; > try { > $a = new A; > } catch (Foo::Exception $e) { > echo "caught\n"; > } > ?> > > throws a Foo::Exception and echoes "caught", demonstrating the > importance of load order as well. You could do use Foo::Exception in b.php too, to solve it. > Stas, your response is quite frustrating to this problem and fits a > pattern. It seems the default response is always "no" or "that's not a > real problem" and is almost always condescending. It makes it extremely No, there's no "default response". Just in this case it happens that your proposal introduces significant problem - performance hit on some innocent construct without any indication of it happening. And the solution for it that you propose is not better than the original state of affairs - doing "use" solves both cases, and if not doing "use" then your case has more problems. It has nothing to do with me or you - it has to do with how things work in the engine. > difficult to have an intelligent debate with you. If you don't think > something is a real problem, perhaps a better default response is "why I think it is a problem, however I do not think this solution is going to make things better. I am sorry if it looked like condescending to you, it was not my intent. However, the conclusion still stays - I think as proposed, this solution introduces more problems than solves. I would be happy to find a solution that is better - and I am looking for one - but right not it isn't good enough. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com