Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60407 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27991 invoked from network); 1 May 2012 22:54:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 May 2012 22:54:02 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 67.192.241.123 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.123 smtp123.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.123] ([67.192.241.123:45246] helo=smtp123.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 06/CE-38165-88960AF4 for ; Tue, 01 May 2012 18:54:01 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp2.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id 112717835C; Tue, 1 May 2012 18:53:58 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp2.relay.dfw1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 5F1B778156; Tue, 1 May 2012 18:53:57 -0400 (EDT) Message-ID: <4FA06984.80308@sugarcrm.com> Date: Tue, 01 May 2012 15:53:56 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: Danko Alexeyev CC: Laruence , reeze , "internals@lists.php.net" , "tony2001@php.net" , "stas@php.net" , "dmitry@php.net" , "nikic@php.net" , "felipe@php.net" References: <3B7600EC10A34F89AA8195C7A83089C0@gmail.com> <4F9FE2AA.1080509@very.lv> In-Reply-To: <4F9FE2AA.1080509@very.lv> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: Bug/Req:#61422顛 enble Type Hint autoloading From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > Because Foo_Bar could be *defined* under a different name, say, > Foo_Blah. Then, as soon as someone needed Foo_Bar, we would use > class_alias to add an alias. That is, as soon as someone tried using class_alias is a dirty hack. instanceof implies that the object is an instance of specific class. If the class is not loaded, no object can be an instance of it. So no autoloading is necessary. > Foo_Bar it would turn out that Foo_Bar and Foo_Blah are the same class > and all Foo_Blah objects are *also* Foo_Bar objects and everything is > cool. Therefore foo(new Foo_Blah()) would work (if there was autoload). > > Please see the demo I provided at https://bugs.php.net/bug.php?id=61422 I do not see how anything good can come out of encouraging stuff like this. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227