Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32847 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47108 invoked by uid 1010); 18 Oct 2007 10:08:16 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 47092 invoked from network); 18 Oct 2007 10:08:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Oct 2007 10:08:16 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.198.187 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.198.187 rv-out-0910.google.com Received: from [209.85.198.187] ([209.85.198.187:13506] helo=rv-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 28/85-12850-F8037174 for ; Thu, 18 Oct 2007 06:08:16 -0400 Received: by rv-out-0910.google.com with SMTP id k15so107674rvb for ; Thu, 18 Oct 2007 03:08:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=/gr26KdgPlaHrDqiTez1aVV3HM5Z7wNRZdTVA/WJAQU=; b=gSzxbeasR4taV0QtSWOEqkYM/EzEcjUcuXxPARJEud+FR02I8/+Vir8ejlW6reHsaLtznAbPgSU5DUTmd8bCmV8HdOIewIpvtJZpx62JAhvqf/RXq2rdBqgdl2lWksmJp+/lQw1at5Q+ByuAaPR4fSoe61Ovnq9X6jQs/AJ5cy0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=OOsX9NTro3wDxhx+50SHigLrRxgTS9dEkE4m9c/kfzqy66Wqq+2NJbl4p618AK2BY1WETGhK7IMJldUbALsUcNcMI9Vj2dKPEduHyBnctsTNbh7srVDd1WIJt6BsFOh96iB9eRNqrEH/Jur9cZUYS8B6uBb0WU93r4E9csvS2Ss= Received: by 10.141.78.14 with SMTP id f14mr173994rvl.1192702092870; Thu, 18 Oct 2007 03:08:12 -0700 (PDT) Received: by 10.140.148.16 with HTTP; Thu, 18 Oct 2007 03:08:12 -0700 (PDT) Message-ID: Date: Thu, 18 Oct 2007 12:08:12 +0200 To: "Andi Gutmans" Cc: "Stanislav Malyshev" , "Sebastian Nohn" , "=?ISO-8859-1?Q?Johannes_Schl=FCter?=" , "Sebastian Bergmann" , internals@lists.php.net In-Reply-To: <698DE66518E7CA45812BD18E807866CECC6469@us-ex1.zend.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1191237850.2903.19.camel@johannes.nop> <698DE66518E7CA45812BD18E807866CEB9528E@us-ex1.zend.net> <4701E210.70109@nohn.net> <698DE66518E7CA45812BD18E807866CEB954E9@us-ex1.zend.net> <8c631e020710171158n25b5efedt4eccf7d816331407@mail.gmail.com> <47166930.7000706@zend.com> <698DE66518E7CA45812BD18E807866CECC6469@us-ex1.zend.net> Subject: Re: [PHP-DEV] T_IMPORT vs. T_USE From: pierre.php@gmail.com (Pierre) On 10/18/07, Andi Gutmans wrote: > Main problem I have right now after digging deeper is that any such "fix" in the parser will mean that tokenizers and syntax highlighters will not treat keywords like "import" correctly. Fixing this would require them to do parsing which in many cases you don't want to do. There are a lot of utilities and tools which depend on such behavior. > Even if it's just for this reason it may be better if we stick to the "a keyword is a keyword" rule and don't try and outsmart ourselves (other languages like C have discovered the same issues and stuck to the keyword only rule too). So it may make most sense to go ahead and use "use". If we stick to this rule, we can't add new keywords in minor/patch versions. (x.y+1 or x.y.z+1) as it break BC. With import, a lot of codes is affected even if they use "import" as method name (said already, add symfony to the list). I really don't care about use or import but for what I see, import is going to break (as said already) a lot of apps/codes out ther (add symfony to the list). I would prefer Stan's patch to allow keyword to be used as class/method/function name. At the very least (the patch has unsolvable issues), I have to agree with Andi, we should just go with "use" (codesearch returns less than 10 results :). Cheers, --Pierre