Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32935 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34373 invoked by uid 1010); 23 Oct 2007 20:46:02 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 34344 invoked from network); 23 Oct 2007 20:46:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Oct 2007 20:46:01 -0000 Authentication-Results: pb1.pair.com header.from=d.giedrius@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=d.giedrius@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.146.178 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: d.giedrius@gmail.com X-Host-Fingerprint: 209.85.146.178 wa-out-1112.google.com Received: from [209.85.146.178] ([209.85.146.178:33395] helo=wa-out-1112.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0D/EC-03376-78D5E174 for ; Tue, 23 Oct 2007 16:46:00 -0400 Received: by wa-out-1112.google.com with SMTP id l24so2047166waf for ; Tue, 23 Oct 2007 13:45:56 -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=REioO7TtYOq/XRgOUf93bSk3UFyCE2oI2iF+e3urno8=; b=apMNX41eVqENEwCNvIITNySUz6sxzcsBzTvIJaUi4ALrIXF/TENt0LnQSwuy/4vwX9iMjPIgDXNYGGh/kIP6mxRJ4FQ0ybiN4thOzGu0vv82trod8uIJ6eBE935JXU3xWzsu6GwNW/wWys0oZYxtJEpYhFiZyHoks55YthB/0ug= 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=IgCw2/AiMN5Gsz24UVKMUjFXujkPcKtLKlEuMJeMOgZUvAg09fnmsVuG3Q9LEbJGxky6zuSL8O9ctY0L7qnL76mVMt/WcR50GCLiAHpM2F3NbLIjmyXpb2d7wCweqqMA/IRwcuSj+MUEGA9EgbTt0wX3Fbfd0dZvH2at2YKe1Co= Received: by 10.114.103.1 with SMTP id a1mr7197813wac.1193172355865; Tue, 23 Oct 2007 13:45:55 -0700 (PDT) Received: by 10.115.91.3 with HTTP; Tue, 23 Oct 2007 13:45:55 -0700 (PDT) Message-ID: <3d1a63d10710231345v7fa0d09ayb059c7fe0977fdf6@mail.gmail.com> Date: Tue, 23 Oct 2007 23:45:55 +0300 To: "Gregory Beaver" Cc: "Stanislav Malyshev" , "PHP Internals" In-Reply-To: <471E43DE.9030706@chiaraquartet.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <471D1600.2030603@zend.com> <471D2FDC.8010505@chiaraquartet.net> <471D394F.50007@zend.com> <471D6DDC.4050705@chiaraquartet.net> <3d1a63d10710230208i35424b14u3fb454b5b7fd4eca@mail.gmail.com> <471DFF3F.2040609@chiaraquartet.net> <3d1a63d10710231042r6a1c9067t119ad6572fa22273@mail.gmail.com> <471E43DE.9030706@chiaraquartet.net> Subject: Re: [PHP-DEV] Re: import/use last call From: d.giedrius@gmail.com ("Giedrius D") On 10/23/07, Gregory Beaver wrote: > > > namespace (Foo::Bar); > > import(new new); > > > parse error - of all reserved words, only "namespace" and "import" are > allowed as class names in my patch Sorry missed that. Somehow I thought this applies only to functions. Anyway allowing some keywords as class/function names and other not adds some inconsistency to the language IMHO. > > // etc. > > ?> > > Looks kinda odd to me although it might have sense in some context. > > > > Anyway my main question was: is there any reason not to use keyword "use"? > The only reason for me is that "use" implies some kind of autoloading, > as I suggested in one of my other mails. This gets into parsing > semantics, something I'm not interested in doing. I guess it's the matter of background. To me "import" implies autoloading where "use" doesn't. > If the folks go with > "use" that is fine, but for me personally not the best solution, which > is why I put hours into making this patch. > > However, no matter what I definitely would like to see code written for > PHP 5.2 and earlier that uses "import" or "namespace" as class names or > functions continue to work in PHP 5.3. "namespace" is used commonly for > XML information (for obvious reasons), and import is a very common idea, > as already stated. I appreciate work but as I said above I think it adds inconsistency and I think its not very good idea. I deffinetely agree that code written for PHP 5.2 should continue to work in PHP 5.3. However this patch is only one of possible solutions and it's up to you guys which way to go. Just a thought: maybe we should be discussing namespace/name_space/something instead of import/use :-) Just my 2 cents. Giedrius