Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53336 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37813 invoked from network); 16 Jun 2011 16:40:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Jun 2011 16:40:19 -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:48150] helo=smtp123.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D8/D4-32650-2F13AFD4 for ; Thu, 16 Jun 2011 12:40:19 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp2.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id 905FA2A8336; Thu, 16 Jun 2011 12:40:16 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp2.relay.dfw1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 2A2E42A832B; Thu, 16 Jun 2011 12:40:16 -0400 (EDT) Message-ID: <4DFA31EF.1050900@sugarcrm.com> Date: Thu, 16 Jun 2011 09:40:15 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: "RQuadling@GMail.com" CC: PHP internals References: <4DF8DC94.5060009@sugarcrm.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Getting a list of registered namespaces. From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! On 6/16/11 8:37 AM, Richard Quadling wrote: > Maybe, but because of a lack of convention on naming, we have namespaces. No, we have namespaces not because we couldn't agree on naming convention, but because any naming convention without namespaces would lead to ugly code (which you call "sensible long names" but which rapidly stop being sensible if you actually try to do it). > So it would seem appropriate to have the ability to investigate a > namespace to see what it contains and/or if it exists. > > Why? For exactly the same reasons you have class_exists(), > interface_exists(), function_exists(). Classes and functions actually exist as objects in the engine. Namespaces do not. They are just parts of names. You can not instantiate a namespace, you can not call a namespace. So these reasons do not apply. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227