Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62881 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96899 invoked from network); 7 Sep 2012 00:37:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Sep 2012 00:37:26 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 67.192.241.163 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.163 smtp163.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.163] ([67.192.241.163:35287] helo=smtp163.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2F/70-03079-3C149405 for ; Thu, 06 Sep 2012 20:37:24 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp26.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id 08A7C800E3; Thu, 6 Sep 2012 20:37:21 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp26.relay.dfw1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id A175E8004B; Thu, 6 Sep 2012 20:37:20 -0400 (EDT) Message-ID: <504941BE.30102@sugarcrm.com> Date: Thu, 06 Sep 2012 17:37:18 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:15.0) Gecko/20120824 Thunderbird/15.0 MIME-Version: 1.0 To: Sherif Ramadan CC: Mark , "internals@lists.php.net" References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Why are the PHP namespaces different compared to C++? From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > Yes, PHP namespaces are completely different from what you'd be used > to in C++. In all honesty namespaces were never well designed in PHP > and were implemented in a haphazard way, which is why I generally > don't bother using them. I just love how people assume if something does not fit their specific use case people implementing it must be stupid and didn't bother to actually think about it. If only they gave it some though, they would definitely would do it exactly as you want. > To clarify, importing namespaces in PHP isn't like importing > namespaces in C++ at all, really. You are merely aliasing namespaces There's no importing namespaces in PHP, period. It is not "messy", it is by design, and if you bothered to read extensive discussions that happened on the list at the time, you'd know why. But of course who needs that. > It simply doesn't work like that because PHP's namespaces are > implemented in such a way that they don't really resemble namespaces. They do not resemble namespaces in C++. They resemble namespaces in PHP. That's because PHP is not C++. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227