Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39078 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44715 invoked from network); 18 Jul 2008 07:58:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Jul 2008 07:58:43 -0000 Authentication-Results: pb1.pair.com header.from=moriyoshi@at.wakwak.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=moriyoshi@at.wakwak.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain at.wakwak.com designates 219.103.130.152 as permitted sender) X-PHP-List-Original-Sender: moriyoshi@at.wakwak.com X-Host-Fingerprint: 219.103.130.152 mgdnp2.nw.wakwak.com Received: from [219.103.130.152] ([219.103.130.152:56847] helo=mgdnp2.nw.wakwak.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AD/46-31728-03D40884 for ; Fri, 18 Jul 2008 03:58:42 -0400 Received: from vckyb1.nw.wakwak.com (postfix@vckyb1.nw.wakwak.com [211.9.230.144]) by mgdnp2.nw.wakwak.com (8.14.3/8.14.3/2008-07-17) with SMTP id m6I7wYml096924; Fri, 18 Jul 2008 16:58:34 +0900 (JST) (envelope-from moriyoshi@at.wakwak.com) Received: from at.wakwak.com (at.wakwak.com [211.9.230.135]) by vckyb1.nw.wakwak.com (Postfix) with ESMTP id 2FCDB30052; Fri, 18 Jul 2008 16:58:34 +0900 (JST) Received: from [10.1.6.29] (c-gate0.bioinfo.sfc.keio.ac.jp [133.27.19.40]) (user=moriyoshi mech=CRAM-MD5) by at.wakwak.com (8.14.3/8.14.3/2008-07-15) with ESMTP/inet id m6I7wXqO082085; Fri, 18 Jul 2008 16:58:33 +0900 (JST) (envelope-from moriyoshi@at.wakwak.com) In-Reply-To: <200807180110.38919.larry@garfieldtech.com> References: <54FF091B-A4BE-4C3E-9783-D2DE93D6AF31@at.wakwak.com> <200807180110.38919.larry@garfieldtech.com> Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-ID: <50CB07D0-D4A6-45AF-9E54-A2D1C4F2E7BC@at.wakwak.com> Cc: internals@lists.php.net Content-Transfer-Encoding: 7bit Date: Fri, 18 Jul 2008 16:54:17 +0900 To: Larry Garfield X-Mailer: Apple Mail (2.753.1) Subject: Re: [PHP-DEV] [PATCH] Allow use($var..) statement ubiquitously From: moriyoshi@at.wakwak.com (Moriyoshi Koizumi) That's one of the motivations for the patch. I never liked the new syntax, but if it was given a go, it should also be made consistent with the another part of the syntax. Oh, I just got one important thing in mind to mention; test1.php: test2.php: running test1.php ends up with two lines of "bar", surprisingly. This is somewhat confusing, but surely one of the things that could not ever be done. This might be a great help when you use a PHP-script file as a mark-up template. Moriyoshi On 2008/07/18, at 15:10, Larry Garfield wrote: > > Which is why I am not a fan of this syntax as proposed. You're > using the same > keyword to mean two different but very very close things. That's very > confusing. It also means that you cannot take a global by value in a > closure. > > Earlier the following was proposed: > > function foo($a, &$b) global ($c, &$d) { > > } > > $bar = new function($a, &$b) use ($c, &$d) global ($e, &$f) { > > }; > > Which I think is much more self-explanatory, accomplishes the same > goal, and > still does not introduce any new keywords. (I still think > "lexical" is > better than "use", and safe, but whatev. ) > > -- > Larry Garfield > larry@garfieldtech.com > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >