Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40814 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 72324 invoked from network); 1 Oct 2008 07:34:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Oct 2008 07:34:39 -0000 Authentication-Results: pb1.pair.com header.from=kenashkov@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=kenashkov@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.200.169 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: kenashkov@gmail.com X-Host-Fingerprint: 209.85.200.169 wf-out-1314.google.com Received: from [209.85.200.169] ([209.85.200.169:46265] helo=wf-out-1314.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 86/59-12248-E0823E84 for ; Wed, 01 Oct 2008 03:34:39 -0400 Received: by wf-out-1314.google.com with SMTP id 26so425156wfd.26 for ; Wed, 01 Oct 2008 00:34:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=ITwxI6YY96XZIWOSVcJSA1PMumLivKzulM4wJCw0iS4=; b=eRpt9JoxzclP0rN7wNddH7IBA8tTG47uu+v5dWFerZLRCjKA0LUhYuVbAGrNNhS9j4 VwBXKzhsxjaywhbklBt3m7i063NmH3Fe3jXtmgYkfsdjUq6frx8RRpw6heBkJKBEY8Rc YDQOpL6KdzhsjRo3el2Y18oo2c/dj624YR/vs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=Al24XuqnMSuqxy5qPVu2wJaPOKSOa03P0MpqA/hig+UWuWLcNoLmGl/7RI+Hx+u8Pb k8vpW+foE6xTXavpy0AH6tImYttqgtWAEHSrZmH3oZGJQhDF+fjN0kVf5cHX3+2hFnga 5LR7twp1zSmp4YCYr/KqwmJXwwHeP3W5BCtSQ= Received: by 10.142.158.17 with SMTP id g17mr3239288wfe.17.1222846475624; Wed, 01 Oct 2008 00:34:35 -0700 (PDT) Received: by 10.142.76.6 with HTTP; Wed, 1 Oct 2008 00:34:35 -0700 (PDT) Message-ID: <261daaa10810010034o26b58c0el3fdda5a7b32a04f5@mail.gmail.com> Date: Wed, 1 Oct 2008 10:34:35 +0300 To: "Stanislav Malyshev" Cc: "PHP Internals" In-Reply-To: <48D7F5EF.3090202@zend.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_30280_8438110.1222846475633" References: <48D7F5EF.3090202@zend.com> Subject: Re: [PHP-DEV] namespace issues From: kenashkov@gmail.com ("Vesselin Kenashkov") ------=_Part_30280_8438110.1222846475633 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline I'm -1 for "removing constants and functions from the namespaces". As I wrote already in another thread, is it possible to have a fatal error thrown when the engine detects an ambiguity situation? Are there any logical (i mean from OOP point of view) or internals (performance and so on) problems with this solution? In my opinion is better than dropping funcs & consts. Vesselin Kenashkov On Mon, Sep 22, 2008 at 10:45 PM, Stanislav Malyshev wrote: > Hi! > > On the ZendCon, we (Marcus, Elizabeth, Andi and myself) had a talk about > what we'd like to do with namespaces, and we arrived at the following > conclusions, which we propose to implement in 5.3: > > 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 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 > syntaxes will be identical. > > 2. Simplify resolution order for classes in the namespace: unqualified > names are resolved this way: > a) check "use" list if the name was defined at "use", follow that > resolution > b) if not, the name resolves to namespace::name > Consequence of this will be that for using internal class inside namespace > one would need to refer to it either as ::Foo or do use ::Foo prior to its > usage. > > 3. Functions will not be allowed inside namespaces. We arrived to > conclusion that they are much more trouble than they're worth, and summarily > we would be better off without them. Most of the functionality could be > easily achieved using static class methods, and the rest may be emulated > with variable function names, etc. > > Comments? > -- > Stanislav Malyshev, Zend Software Architect > stas@zend.com http://www.zend.com/ > (408)253-8829 MSN: stas@zend.com > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > ------=_Part_30280_8438110.1222846475633--