Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39651 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 54983 invoked from network); 5 Aug 2008 05:48:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Aug 2008 05:48:43 -0000 Authentication-Results: pb1.pair.com smtp.mail=moriyoshi@at.wakwak.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=moriyoshi@at.wakwak.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain at.wakwak.com designates 219.103.130.24 as permitted sender) X-PHP-List-Original-Sender: moriyoshi@at.wakwak.com X-Host-Fingerprint: 219.103.130.24 mgdnp1.nw.wakwak.com Received: from [219.103.130.24] ([219.103.130.24:62893] helo=mgdnp1.nw.wakwak.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8C/E1-45722-AB9E7984 for ; Tue, 05 Aug 2008 01:48:43 -0400 Received: from vckyb1.nw.wakwak.com (postfix@vckyb1.nw.wakwak.com [211.9.230.144]) by mgdnp1.nw.wakwak.com (8.14.3/8.14.3/2008-07-17) with SMTP id m755mdcR061689; Tue, 5 Aug 2008 14:48:39 +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 2623F30052; Tue, 5 Aug 2008 14:48:39 +0900 (JST) Received: from [10.6.6.252] (gw1-ns.bioinfo.ttck.keio.ac.jp [131.113.122.81]) (user=moriyoshi mech=CRAM-MD5) by at.wakwak.com (8.14.3/8.14.3/2008-07-15) with ESMTP/inet id m755mbfd016588; Tue, 5 Aug 2008 14:48:39 +0900 (JST) (envelope-from moriyoshi@at.wakwak.com) Message-ID: <4897E9B5.9020006@at.wakwak.com> Date: Tue, 05 Aug 2008 14:48:37 +0900 User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Dmitry Stogov Cc: Marcus Boerger , internals@lists.php.net References: <909776579.20080803142659@marcus-boerger.de> <4896A7C4.8090503@zend.com> <4110083360.20080804104233@marcus-boerger.de> <4896EA3C.6010203@zend.com> In-Reply-To: <4896EA3C.6010203@zend.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Inconsistencies in 5.3 From: moriyoshi@at.wakwak.com (Moriyoshi Koizumi) Dmitry Stogov wrote: > > > Marcus Boerger wrote: >> Hello Dmitry, >> >> Monday, August 4, 2008, 8:55:00 AM, you wrote: >> >>> Hi Marcus, >> >>> see below >> >>> Marcus Boerger wrote: >>>> Hello Internals, >>>> >>>> please let's not introduce new inconsistencies. Rather lets make new >>>> stuff consistent with old stuff during the alpha phase of 5.3. >>>> >>>> 1) new keyword 'use'. Semantically it is the same as 'static' or >>>> 'global' >>>> so it should be used in the same location. >> >>> For me 'use' is the best keyword as it says that closure uses >>> variables from current content. (the same keyword is used for import >>> from namespaces) >> >> To be clear, I wasn't complaining about the keyword per se. I just prefer >> it to be inside the curly braces of a closure next to global rather >> than in >> front of it. >> > > No. The list of lexical variables is a part of the closure definition. > > The earlier implementation had "lexical" keyword which worked as you are > suggesting, but it was much unclear. I don't think there are many differences in ambiguity between $closure = function ($arg) { use $a; ... }; and $closure = function ($arg) use ($a) { }; Moriyoshi -- Moriyoshi Koizumi