Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:20803 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27473 invoked by uid 1010); 29 Nov 2005 08:04:53 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 27458 invoked from network); 29 Nov 2005 08:04:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Nov 2005 08:04:52 -0000 X-Host-Fingerprint: 213.136.52.68 mailgate-out2.mysql.com Linux 2.5 (sometimes 2.4) (4) Received: from ([213.136.52.68:49677] helo=mailgate.mysql.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id B1/66-21657-1AB0C834 for ; Tue, 29 Nov 2005 03:04:49 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate.mysql.com (8.13.4/8.13.4) with ESMTP id jAT84iA9011394; Tue, 29 Nov 2005 09:04:44 +0100 Received: from mail.mysql.com ([10.222.1.99]) by localhost (mailgate.mysql.com [10.222.1.98]) (amavisd-new, port 10026) with LMTP id 10723-01; Tue, 29 Nov 2005 09:04:44 +0100 (CET) Received: from [127.0.0.1] (shell.mysql.com [10.100.1.73]) (authenticated bits=0) by mail.mysql.com (8.13.3/8.13.3) with ESMTP id jAT84YVt000653 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 29 Nov 2005 09:04:39 +0100 Message-ID: <438C0B92.4000500@php.net> Date: Tue, 29 Nov 2005 09:04:34 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b2) Gecko/20050704 SeaMonkey/1.0a MIME-Version: 1.0 To: =?ISO-8859-15?Q?Oliver_Gr=E4tz?= CC: internals@lists.php.net References: <4F.D1.21657.21C7B834@pb1.pair.com> In-Reply-To: <4F.D1.21657.21C7B834@pb1.pair.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new at mailgate.mysql.com Subject: Re: [PHP-DEV] Namespaces: Technical proposal From: hartmut@php.net (Hartmut Holzgraefe) Oliver Gr=E4tz wrote: > Here's the idea: When the tokenizer encounters the opening "?" of the > ternary, it DEACTIVATES the namespace operator until the end of the > ternary. This way, all old code will behave as before, nothing will be > broken. Of course, this absolutely requires the use of parentheses if > one absolutely needs to use namespaces inside the ternary. As such case= s > will be pretty rare, this is no big drawback. The good thing: no > whitespace magic is needed! this adds almost the same WTF? factor as requring whitespace, and being a pretty rare case only adds to this ... (not to mention that maintaining a parser with special state rules like this becomes a WTF? PITA anyway ...) --=20 Hartmut Holzgraefe, Senior Support Engineer . MySQL AB, www.mysql.com