Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65967 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89750 invoked from network); 19 Feb 2013 16:40:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Feb 2013 16:40:54 -0000 Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.219.54 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.219.54 mail-oa0-f54.google.com Received: from [209.85.219.54] ([209.85.219.54:43315] helo=mail-oa0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A7/BD-17768-51BA3215 for ; Tue, 19 Feb 2013 11:40:54 -0500 Received: by mail-oa0-f54.google.com with SMTP id n12so7159250oag.13 for ; Tue, 19 Feb 2013 08:40:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=13RXl/TFX5oYq/T5UkwjVIjE9LYhrTdQcjjTBcKEkJA=; b=TiL1pMghGfxnnc396smi7EK67Zl1TLoUeFbYyx5H7MIwrCp602udIPdK0svigw3zQF Eq0Y8+MbQgtBauy+u3rR7JloRCsWanQN9gGftaclZ/V2X60SoG0AAXauN9UuuyYJxPPE 8Rz4bDo4s/G0KZVViSqx5jC3t5ihFonIhSLtEcCBf9gQrUw+2cHjtNSDqFeBtei6AuMQ +qiD756EuB9Bw6JEXXmHnR1wnBs8FezNimqA9rVDUzdBuspGOgNS+MAXX0h6L8VhpOGN oOK8RpTZVBWXzyJlVfqyXMgiKG73WqR2IPkP/+SSAaM47qNrX5+d0z9V8O59PGEiNxdU iIHw== MIME-Version: 1.0 X-Received: by 10.182.221.105 with SMTP id qd9mr5369647obc.97.1361292051491; Tue, 19 Feb 2013 08:40:51 -0800 (PST) Received: by 10.76.24.234 with HTTP; Tue, 19 Feb 2013 08:40:51 -0800 (PST) In-Reply-To: References: <8490FC41-2696-4948-83A1-3931674183B0@gmail.com> Date: Tue, 19 Feb 2013 09:40:51 -0700 Message-ID: To: Florin Razvan Patan Cc: Marcello Duarte , PHP Internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] [RFC] Short syntax for anonymous functions From: morrison.levi@gmail.com (Levi Morrison) > Say we agree on the syntax above >> ($n) |$m| => $m * $n; > What happens when my one liner function needs to do one more operation > like checking the value of $n before multiplication? As I stated before suggesting the syntax: It's only meant for a single expression. It's purposefully NOT intended to cover multiple expressions. In that case the current (verbose) syntax is better for all criteria I care about. Additionally, neither Python nor Dart allows multiple expressions in their short-syntax functions.