Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88474 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 18778 invoked from network); 24 Sep 2015 13:08:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Sep 2015 13:08:16 -0000 Authentication-Results: pb1.pair.com smtp.mail=j.boggiano@seld.be; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=j.boggiano@seld.be; sender-id=pass Received-SPF: pass (pb1.pair.com: domain seld.be designates 209.85.212.181 as permitted sender) X-PHP-List-Original-Sender: j.boggiano@seld.be X-Host-Fingerprint: 209.85.212.181 mail-wi0-f181.google.com Received: from [209.85.212.181] ([209.85.212.181:34535] helo=mail-wi0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 19/70-12405-DB5F3065 for ; Thu, 24 Sep 2015 09:08:15 -0400 Received: by wicfx3 with SMTP id fx3so27239520wic.1 for ; Thu, 24 Sep 2015 06:08:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=AGGRVoCXV8fyNj02kOiszhjAXw4KobkPp3IKQbLliXM=; b=fKxhRf6oE6F4lqwqT0ZKyXxkc49kgnITFWlA4/tETpk2PM63F9R23wmzHgRj/5JH/o L/mgBN1Ov69SqQaic0QkAEwCYG0ntGVbLd5fC3KHwsuPKpupiopZlzWr/rN1HyGYS08U n7w1ENxIfnDZtTudO7Y2GnpE2r1YPEUaZcIIr4+rGKD7cGql+z0JnqHYJ13AMKXvm9QU jGAcQF0WB3TE54hoViyR1PVOfI22qvUiuZ/8UeioJ8e+gL++GVHZ8+oefflunCfIyBkz cjoYEJ7p3/RgWj7NHE/okcUBay3+8ae+eBOCOjFNWGDZlvQgPEcJV4mjAVBH5EkpC5DY VEUA== X-Gm-Message-State: ALoCoQkxfGVY7mWAeERMUt+pjxRdaZgbYaBE45T5hXBkwZ6gDcGrSjATyI51Flke8avPjQXZcXHl X-Received: by 10.180.8.232 with SMTP id u8mr10807718wia.10.1443100090589; Thu, 24 Sep 2015 06:08:10 -0700 (PDT) Received: from [192.168.0.2] (cpc74585-lewi13-2-0-cust978.2-4.cable.virginm.net. [82.25.75.211]) by smtp.googlemail.com with ESMTPSA id mc18sm13596276wic.23.2015.09.24.06.08.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Sep 2015 06:08:09 -0700 (PDT) To: internals@lists.php.net References: <28.4D.56639.BB071065@pb1.pair.com> Message-ID: <5603F5BE.6070206@seld.be> Date: Thu, 24 Sep 2015 14:08:14 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: [RFC] [VOTE] Short Closures From: j.boggiano@seld.be (Jordi Boggiano) On 24/09/2015 07:39, Marco Pivetta wrote: > - I'm still conflicted on automatically importing all of the scope into > the closure: while it is working for functional languages, that's where > most of the headaches come from in languages such as javascript. The automatic import IMO isn't as much an issue as in JS, because it imports by value and not by reference as is done in JS. If you do $foo = 'bar'; in your closure and suddenly someone in the outer scope defines $foo as well, you aren't going to overwrite that outer scope value. Therefore the risks for interferences are reduced quite a bit. Cheers -- Jordi Boggiano @seldaek - http://seld.be