Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:36344 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52394 invoked from network); 22 Mar 2008 23:07:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Mar 2008 23:07:30 -0000 Authentication-Results: pb1.pair.com smtp.mail=felipensp@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=felipensp@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.132.240 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: felipensp@gmail.com X-Host-Fingerprint: 209.85.132.240 an-out-0708.google.com Received: from [209.85.132.240] ([209.85.132.240:35082] helo=an-out-0708.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BE/EB-16027-13195E74 for ; Sat, 22 Mar 2008 18:07:30 -0500 Received: by an-out-0708.google.com with SMTP id c18so443780anc.1 for ; Sat, 22 Mar 2008 16:07:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; bh=b75YLr7gJRshdglWPUrMAatzSiNcpE4m5hOd1Ts0lOs=; b=CfW5r3zy1jlkIpJ9K+ck6tTnXs2TpINb3OApwp5Cq3/pNRgv+0M9FrXieojZlqMOQSP/yGWLXM7yX3ergOOTA2jDL9u89Vr8i5o06fBN4UUa79wDToEd/6ED55sytq5zmbErESsgcoHpBYKf4ZntelnCYeq2x3gmD451r4fofEo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; b=Lxu5gylyAoe5mRngmFa096dvhYqG5s+d8r5AE/jKT2MFOieaETNo7iQQPRoBsCzS6/xN6zAlWDwYIbS46O7X7W6cwYHeda3jPgOeBuNfQ6+OeWHzZqg34ccIHOKt/pR8qbkzG/ibZ8zXRVfpj3u8jk1M80uljqpXuBjKaXWr97k= Received: by 10.100.41.9 with SMTP id o9mr13409051ano.48.1206227246961; Sat, 22 Mar 2008 16:07:26 -0700 (PDT) Received: from ?189.24.37.148? ( [189.24.37.148]) by mx.google.com with ESMTPS id n26sm9876296ele.13.2008.03.22.16.07.24 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 22 Mar 2008 16:07:26 -0700 (PDT) To: Gregory Beaver Cc: internals@lists.php.net In-Reply-To: <47E585E1.9060307@chiaraquartet.net> References: <1789567073.20080321223647@marcus-boerger.de> <47E43032.20507@chiaraquartet.net> <1206186368.5916.3.camel@pena> <47E585E1.9060307@chiaraquartet.net> Content-Type: text/plain; charset=utf-8 Date: Sat, 22 Mar 2008 20:07:12 -0300 Message-ID: <1206227233.5916.15.camel@pena> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Re: [RFC] Namespace syntax decision From: felipensp@gmail.com (Felipe Pena) Em Sáb, 2008-03-22 às 17:19 -0500, Gregory Beaver escreveu: > Felipe Pena wrote: > > Em Sex, 2008-03-21 às 17:01 -0500, Gregory Beaver escreveu: > >>> 1) namespace foo { } > >> This is acceptable if nothing can exist outside namespace foo {} except > >> declare and other namespace declarations. > >> > > > > Indeed! > > > > Here's my try: > > http://felipe.ath.cx/diff/namespace.diff > > http://felipe.ath.cx/diff/namespace.phpt > > > > Hi Felipe, > > The patch is pristine coding, but I do think the error message needs > some loving: > > + if (zend_do_namespace_check(TSRMLS_C) == FAILURE) { > + zend_error(E_COMPILE_ERROR, "Only namespace declaration is allowed > in the script"); > > This implies that only "namespace" is allowed, and would be confusing to > 99% of users. Might I suggest this error message instead: > > "This script contains namespaces, all other code must be contained > within namespace declarations" Nice. Patch updated! :) -- Regards, Felipe Pena.