Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40622 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10457 invoked from network); 23 Sep 2008 08:13:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Sep 2008 08:13:26 -0000 Authentication-Results: pb1.pair.com smtp.mail=lstrojny@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=lstrojny@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 78.46.69.2 as permitted sender) X-PHP-List-Original-Sender: lstrojny@php.net X-Host-Fingerprint: 78.46.69.2 milch.schokokeks.org Received: from [78.46.69.2] ([78.46.69.2:51925] helo=milch.schokokeks.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CD/0E-35835-F15A8D84 for ; Tue, 23 Sep 2008 04:13:25 -0400 Received: from [10.88.8.133] (colt-d53d2146.colt.mediaventures.de [::ffff:213.61.33.70]) (AUTH: PLAIN lars@schokokeks.org, TLS: TLSv1/SSLv3,256bits,CAMELLIA256-SHA) by milch.schokokeks.org with esmtp; Tue, 23 Sep 2008 10:13:16 +0200 id 000000000000C007.0000000048D8A51C.00005824 To: Stanislav Malyshev Cc: 'PHP Internals' In-Reply-To: <48D7F5EF.3090202@zend.com> References: <48D7F5EF.3090202@zend.com> Date: Tue, 23 Sep 2008 10:13:15 +0200 Message-ID: <1222157595.4213.3.camel@lstrojny> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=_milch.schokokeks.org-22564-1222157596-0001-2" X-Mailer: Evolution 2.22.3.1 Subject: Re: [PHP-DEV] namespace issues From: lstrojny@php.net (Lars Strojny) --=_milch.schokokeks.org-22564-1222157596-0001-2 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Stas, Am Montag, den 22.09.2008, 12:45 -0700 schrieb Stanislav Malyshev: [...] > On the ZendCon, we (Marcus, Elizabeth, Andi and myself) had a talk about=20 > what we'd like to do with namespaces, and we arrived at the following=20 > conclusions, which we propose to implement in 5.3: Thanks for the effort. > 1. Allow braces for namespaces. So, the syntax for namespaces will be: > a) namespace foo; > should be first (non-comment) statement in the file, namespace extends=20 > to the end of the file or next namespace declaration. > b) namespace foo {} > can appear anywhere on the top scope (can not be nested). > Mixing both syntaxes in one file is not possible. The semantics of both=20 > syntaxes will be identical. >=20 > 2. Simplify resolution order for classes in the namespace: unqualified=20 > names are resolved this way: > a) check "use" list if the name was defined at "use", follow that resolut= ion > b) if not, the name resolves to namespace::name > Consequence of this will be that for using internal class inside=20 > namespace one would need to refer to it either as ::Foo or do use ::Foo=20 > prior to its usage. >=20 > 3. Functions will not be allowed inside namespaces. We arrived to=20 > conclusion that they are much more trouble than they're worth, and=20 > summarily we would be better off without them. Most of the functionality=20 > could be easily achieved using static class methods, and the rest may be=20 > emulated with variable function names, etc. +1 cu, Lars --=20 Jabber: lars@strojny.net Weblog: http://usrportage.de --=_milch.schokokeks.org-22564-1222157596-0001-2 Content-Type: application/pgp-signature; name="signature.asc" Content-Transfer-Encoding: 7bit Content-Description: Dies ist ein digital signierter Nachrichtenteil -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (GNU/Linux) iQIcBAABAgAGBQJI2KUaAAoJECQPF+sCY6wHBBYP/idfmNHOMVZYfUZrvbgrlKDv F6sAkTVejYrWfRIa+OB4TKCrQT56+CV2YFPQ10LNBGsT9PJk9JSFx9cGb4yjta0o AmrLhjTr9C4uQ08sLuKWqWXmZZJFqEbxWo6oQ2/MV3GoSPI79sb6DwmmHqRdd+10 08BZSe91IBTgiymHJgf/UJeHT6NFKjig5+WcGZCma7lF8zlYLSuFl6owyHrer8+t 16SRSWsPDmbfnTdcoRTYj6VY0c44HYlORAQSiD0OjFgtjgT/ggh4AGklshKZZnUq lpvna7+nVub1MLxT1ZTTgiuq6Vcz3Mr8Z3G579/aMAapt3OW94lah1OTDvyoaZ8O ZFQ4taH0Ow6Mn6UkOE1AUKMV7E0yWLWGE/+O3TLw7pyyxwAZ+ntIrQpr9Q/xH7/m opGJ+3G8W1N15lHwuTy+zNq8N4+2unNej3FGcKtIdpcx2qKUvnPSrDfKdxgmWb2Q g4jWd/xLNZF6wkmBcjWqhMn3WM7HyB7VrAdJe8TdNKhSxCF5yOGmGDme0TZSvwPW jMi0f28DUHL/IEIfVVs3BVm4QRrT2QKjNzNyy0C9WDjnqoCXbs2q226JhsVb39pr 8rdtaytlkK+ziPbXpChvs0gLItYwBSfa4fx0xxdzvQ+6X6v6s436TDub+0rEQsmZ 1cXbDMG0Vo/9skALAggc =xsfJ -----END PGP SIGNATURE----- --=_milch.schokokeks.org-22564-1222157596-0001-2--