Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40494 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 81337 invoked from network); 12 Sep 2008 23:14:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Sep 2008 23:14:53 -0000 X-Host-Fingerprint: 68.112.148.14 68-112-148-14.dhcp.stcd.mn.charter.com Received: from [68.112.148.14] ([68.112.148.14:28911] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4E/E2-22777-BE7FAC84 for ; Fri, 12 Sep 2008 19:14:53 -0400 Message-ID: <4E.E2.22777.BE7FAC84@pb1.pair.com> To: internals@lists.php.net Date: Fri, 12 Sep 2008 18:14:50 -0500 User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 References: <48CABEEB.9070201@chiaraquartet.net> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 68.112.148.14 Subject: Re: [PHP-DEV] [PATCH] allow T_INLINE_HTML before T_NAMESPACE From: rpanning@gmail.com (Ryan Panning) David Coallier wrote: > 2008/9/12 Greg Beaver : >> Hi, >> >> This is a simple patch that allows files like this: >> >> main.php: >> >> >> >> template example >> >> >> >> > namespace my::template; >> // stuff >> ?> >> >> > > Is it me or this doesn't look really clean? I have a clear idea that > namespaces are there to add an extra structural layer to the code and > not to be randomly used in some HTML/PHP/Javascript mixing. > > Since the current namespace implementation doesn't want to have > multiple namespaces per file, I think we should restrict a namespace > per file to... a namespace per file, and nothing else. I can't imagine > taking over someone's code who had declared a namespace under is > footer template. > > Perhaps I am missing something but that would be bloody ugly in the end :) > Since you're looking for input from everyone, I'll throw my 2 cents in. I agree that this should not be allowed. Even with just a new line or space, PHP developers should learn that that is not a good practice. My feelings for namespaces is that it's for frameworks and such. I would be USING [use ...] inside a PHP/XHTML/JS type of file, not declaring a namespace.