Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62883 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99580 invoked from network); 7 Sep 2012 00:42:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Sep 2012 00:42:40 -0000 Authentication-Results: pb1.pair.com smtp.mail=theanomaly.is@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=theanomaly.is@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.42 as permitted sender) X-PHP-List-Original-Sender: theanomaly.is@gmail.com X-Host-Fingerprint: 209.85.215.42 mail-lpp01m010-f42.google.com Received: from [209.85.215.42] ([209.85.215.42:41094] helo=mail-lpp01m010-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2E/11-03079-FF249405 for ; Thu, 06 Sep 2012 20:42:40 -0400 Received: by lahl5 with SMTP id l5so1562027lah.29 for ; Thu, 06 Sep 2012 17:42:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=UPyXfpUufh1Xdmj86wwjZHUJcT7kQcUKkq0jaQlq77U=; b=0QdK2cU8KQUghW9lHU1teko7Ntuqyp0/bCnVDPF1j21Zd+uA/7GQayYzZKyKJJcel1 PPD8zbAc/dNr7/nvgJp7bOF09f3EfTvSgiR1gXfTePKXCKZJsw3BEwR4ptj/+IFQEDVd GSMFiTXdMbesipdC5Mp4MFEy6jyYdNnLeDpoNiwkm578mvij5Qg2Ba7BGFgaJqny2dIh HG0YtUtdPrgJXxs8X0ZO0PHXxojiAZl+nwX00Er2LKgZKVCEgDKoA02R92U3RwY+d6KW pp08HttWHChd8zFKVT+4+fP6sqKaNRLoiRXNSm4+pzZlCf8XfpIK/o+PLYYHNc0jMeTB UFlg== MIME-Version: 1.0 Received: by 10.152.104.44 with SMTP id gb12mr327670lab.29.1346978556342; Thu, 06 Sep 2012 17:42:36 -0700 (PDT) Received: by 10.112.12.178 with HTTP; Thu, 6 Sep 2012 17:42:36 -0700 (PDT) In-Reply-To: <504941BE.30102@sugarcrm.com> References: <504941BE.30102@sugarcrm.com> Date: Thu, 6 Sep 2012 20:42:36 -0400 Message-ID: To: Stas Malyshev Cc: Mark , "internals@lists.php.net" Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Why are the PHP namespaces different compared to C++? From: theanomaly.is@gmail.com (Sherif Ramadan) On Thu, Sep 6, 2012 at 8:37 PM, Stas Malyshev wrote: > 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. I wasn't assuming. I was outright making a factual statement. I never made any implications of the intellectual levels of those implementing the spec. I understand the RFC full well and know why the design is the way it is. I was answering the ops question. Please read what I said before you make your own assumptions. > >> 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. Right, that's exactly what I said. Thanks for reiterating. > >> 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++. > Sure, I just said that. Albeit I said it a more indirect manner. > -- > Stanislav Malyshev, Software Architect > SugarCRM: http://www.sugarcrm.com/ > (408)454-6900 ext. 227