Re: [RFC] Short syntax for anonymous functions

From: Date: Tue, 19 Feb 2013 13:20:55 +0000
Subject: Re: [RFC] Short syntax for anonymous functions
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-65940@lists.php.net to get a copy of this message
Marcello, On Tue, Feb 19, 2013 at 7:57 AM, Marcello Duarte <mduarte@inviqa.com> wrote: > Inspired by Sara, here is another RFC, I finally got around to draft: > > https://wiki.php.net/rfc/short-syntax-for-anonymous-function > > Please feedback, > -- > Marcello Duarte > > I like the concept. I dislike the syntax. It looks too much like a JSON object declaration, and it feels like it should be returning an object instead of a closure/anonymous function. Additionally, I don't like that it's also a closure. Short functions like this should be for simple functions... Perhaps: lambda $x: trim($x); $x: trim($x); Or something similar... Anthony

« previous php.internals (#65940) next »