Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49763 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78393 invoked from network); 18 Sep 2010 10:47:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Sep 2010 10:47:39 -0000 Authentication-Results: pb1.pair.com header.from=indeyets@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=indeyets@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: indeyets@gmail.com X-Host-Fingerprint: 209.85.212.42 mail-vw0-f42.google.com Received: from [209.85.212.42] ([209.85.212.42:39339] helo=mail-vw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D1/E0-07299-9C8949C4 for ; Sat, 18 Sep 2010 06:47:37 -0400 Received: by vws18 with SMTP id 18so2262528vws.29 for ; Sat, 18 Sep 2010 03:47:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=raVvXgThKBH/COodcg2wi1yMwbTbcvWPTOhvQJImSeM=; b=ZUi8WGQsousp28XHgrQDCDaav3pzn4tlRNAr9O+WoDJ5J6fqDL/BZ3xJUJ5I3QKDES XUqLqHZot3itWHcaAqE1vIJ0wVZUdTPiXc3hX9KjHJ+3noq56G3TV48uQcW101Pg9ort WSpHyq7n9OI4B59iJKLNQ1OELpez/j6ZbsfsA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=meDTBQPBSdFqOv2mta4zBSD1a+wTGbLPfHTJp3Xc8Nyw+N+2r/40MUE4ma3TV9Lid5 Dl9pGZlVJmG93lpSwulKzkvpiN/PzDNU8nHtbFaDFEdgOxfyuJTi0l2DsbbHHydvv9nX 2DGJCeSryYrZjhuwV+t3Kznhlgxz0bdXMzbrk= MIME-Version: 1.0 Received: by 10.220.128.142 with SMTP id k14mr3273633vcs.104.1284806854683; Sat, 18 Sep 2010 03:47:34 -0700 (PDT) Received: by 10.220.49.98 with HTTP; Sat, 18 Sep 2010 03:47:34 -0700 (PDT) In-Reply-To: <4C926377.4050203@sugarcrm.com> References: <39505F13-655A-43AF-941E-77750B7F7201@gmail.com> <4C8FC695.2060800@sugarcrm.com> <4C8FD72B.1070108@sugarcrm.com> <4C906333.4030204@sugarcrm.com> <7.0.1.0.2.20100915085504.17eab4d8@zend.com> <12617cf66ae07d7a2fd79a293ed69b85@beberlei.de> <4C9095D5.1050206@toolpark.com> <000001cb5511$467949f0$d36bddd0$@com> <64b4e95cac44ee297a12601d26a5453c@localhost> <4C9258C1.9080207@sugarcrm.com> <4C926083.605@gmail.com> <4C926377.4050203@sugarcrm.com> Date: Sat, 18 Sep 2010 14:47:34 +0400 Message-ID: To: Stas Malyshev Cc: "Ionut G. Stan" , "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Lambdas assigned to constants. Was PHP Annotations RFC + Patch From: indeyets@gmail.com (Alexey Zakhlestin) On Thu, Sep 16, 2010 at 10:35 PM, Stas Malyshev wrote: > Hi! > >> const foo = function () use ($globalVar) { >> >> }; > > How would you call this thing? foo()? Then you have a problem - foo() > already has meaning, and it's "call function named foo", not "get constant > named foo and call function inside if it's there". His idea is, that "get constant named foo and call function inside if it's there" should be the only meaning and "function foo() {}" should be syntactic sugar for defining constant foo with closure inside. -- Alexey Zakhlestin http://www.milkfarmsoft.com/