Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47010 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23892 invoked from network); 21 Feb 2010 04:37:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Feb 2010 04:37:02 -0000 Authentication-Results: pb1.pair.com smtp.mail=ionut.g.stan@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ionut.g.stan@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.219 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: ionut.g.stan@gmail.com X-Host-Fingerprint: 209.85.220.219 mail-fx0-f219.google.com Received: from [209.85.220.219] ([209.85.220.219:35644] helo=mail-fx0-f219.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A9/FC-29373-C68B08B4 for ; Sat, 20 Feb 2010 23:37:01 -0500 Received: by fxm19 with SMTP id 19so1423627fxm.1 for ; Sat, 20 Feb 2010 20:36:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=8H8U5g8cbC7DdGRC8zYwzCWPpdKue4saBv2PA71bnHY=; b=pi3F6YTtrMVmYzzmueGubgDHbvyhA4Xcq31aQ0pybPLsSRIny+6gUbcLDc5ZQ91DU0 qpplrbk3PxsN4hd3FlUUA552qdC6h5+2tKwY5GdaCpVXZVVhvu4HayG8lhyaAv5hRwe9 UcZ61HCWRw1cs9BCemMQrloPVBxXVx7w9mcOo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=fL1x2+d/TeasutmYK0MEfgJZ5yl1GHQSBZe0igXFuODdDhkNIYXuLu/cfCXsRKMFr8 1KLvek4zlQo6T7ZLFFa0KQSsM+v6lYRriyHF7EUXN5U37XeuN9z2qMD7YdalYqMmNqiA MAvwmI8na3xUKRXCEzLk63gP83apejWr4e6bw= Received: by 10.87.42.33 with SMTP id u33mr815088fgj.8.1266727015983; Sat, 20 Feb 2010 20:36:55 -0800 (PST) Received: from 89-36-11-205.stedu.ro ([89.36.11.205]) by mx.google.com with ESMTPS id 3sm4322177fge.6.2010.02.20.20.36.54 (version=SSLv3 cipher=RC4-MD5); Sat, 20 Feb 2010 20:36:55 -0800 (PST) Message-ID: <4B80B8D4.1060300@gmail.com> Date: Sun, 21 Feb 2010 06:38:44 +0200 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1 MIME-Version: 1.0 To: Joey Smith CC: Keryx Web , internals@lists.php.net References: <4B54FC87.8070106@zend.com> <4F.56.22457.408955B4@pb1.pair.com> <4B55D850.8000604@zend.com> <4B808294.1070801@keryx.se> <20100221025510.GA9984@joeysmith.com> In-Reply-To: <20100221025510.GA9984@joeysmith.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] On closures and lamdba From: ionut.g.stan@gmail.com ("Ionut G. Stan") > So to answer your question, for my money, since I can't currently tell the > difference in a programmatic way between an 'anonymous function' and a full > 'closure', I don't find it that worrisome that the PHP world somewhat > conflates the two terms. > For me it's worrisome because future developers, that are just starting programming with PHP, will need more time to understand that a non-anonymous function, i.e. a function that has a name, may just as well benefit of a closure concept (except in the PHP language (if I don't count importing of global variables using the global statement)). A closure is not a special kind of function, a closure is just a link between a function (named or unnamed) and the environment it has been defined in. I totally agree with Keryx, we should use the correct names for these concepts. If it was up to me, I'd name the internal class used to represent lambdas Lambda. -- Ionut G. Stan I'm under construction | http://blog.igstan.ro/