On Mon, Feb 25, 2013 at 1:17 PM, Clint Priest wrote:
>
> On 2/21/2013 5:17 AM, David Muir wrote:
>>
>> On 21/02/2013, at 6:12 AM, Lazare Inepologlou wrote:
>>
>>>
>>> Long code is not always equivalent to readable code. A shorter syntax
>>> could
>>> improve readability in *some* cases.
>>>
>>> L
On 2/21/2013 5:17 AM, David Muir wrote:
On 21/02/2013, at 6:12 AM, Lazare Inepologlou wrote:
Long code is not always equivalent to readable code. A shorter syntax could
improve readability in *some* cases.
Long:
$users->OrderBy( function( $x ){ return $x->Surname; } );
Short:
$users->Order
2013/2/21 Levi Morrison
> On Thu, Feb 21, 2013 at 4:17 AM, David Muir wrote:
> >
> > On 21/02/2013, at 6:12 AM, Lazare Inepologlou
> wrote:
> >
> >> 2013/2/20 Sanford Whiteman <
> swhitemanlistens-softw...@cypressintegrated.com>
> >>
> It still looks like some random characters bashed toge
On Thu, Feb 21, 2013 at 4:17 AM, David Muir wrote:
>
> On 21/02/2013, at 6:12 AM, Lazare Inepologlou wrote:
>
>> 2013/2/20 Sanford Whiteman
>>
It still looks like some random characters bashed together by a monkey
with a keyboard.
>>>
>>> +1, I am a fiend for ternary expressions and cr
On 21/02/2013, at 6:12 AM, Lazare Inepologlou wrote:
> 2013/2/20 Sanford Whiteman
>
>>> It still looks like some random characters bashed together by a monkey
>>> with a keyboard.
>>
>> +1, I am a fiend for ternary expressions and crazy one-liners, but
>> this makes me want to go back and unr
2013/2/20 Sanford Whiteman
> > It still looks like some random characters bashed together by a monkey
> > with a keyboard.
>
> +1, I am a fiend for ternary expressions and crazy one-liners, but
> this makes me want to go back and unroll everything I've ever done
> into readable code. :)
>
> -- S.
> It still looks like some random characters bashed together by a monkey
> with a keyboard.
+1, I am a fiend for ternary expressions and crazy one-liners, but
this makes me want to go back and unroll everything I've ever done
into readable code. :)
-- S.
--
PHP Internals - PHP Runtime Develo
On Tue, 19 Feb 2013, Levi Morrison wrote:
> > Have you considered how this will work/look in an array?
> >
> > $a = [$b => ($n) $m => $m * $n]; // wat.
>
> First off, it should be:
>
> $a = [$b => ($n) |$m| => $m * $n];
>
> The || make a big difference in this situation.
It still looks lik
On 02/19/2013 09:45 AM, Marcello Duarte wrote:
And "just for you" is also inaccurate. You will find that the
technologies I've been referring to are becoming the tools you will
use for DevOps, etc... tasks. Do you guys listen to people outside
of internals? It would be good to have a feedback
@Marcello: actually, I am also of the idea that there's no real additional
value in such a syntax...
Since I'm using ZF2 (yeah, that framework that converts array to
applications) I am kinda used to have dozens of `function () {}` closures
for service factories: so far no problems with it.
As sta
On 19 Feb 2013, at 17:32, Leigh wrote:
>
> On 19 February 2013 16:46, Marcello Duarte wrote:
> I find that more and more my developers have to learn ruby just to be able to
> work in our projects. We are one of the largest PHP shops in Europe and even
> the proprietary tools we are writing for
On 19 February 2013 16:46, Marcello Duarte wrote:
> I find that more and more my developers have to learn ruby just to be able
> to work in our projects. We are one of the largest PHP shops in Europe and
> even the proprietary tools we are writing for DevOps stuff we are writing
> in Ruby. This s
> Have you considered how this will work/look in an array?
>
> $a = [$b => ($n) $m => $m * $n]; // wat.
First off, it should be:
$a = [$b => ($n) |$m| => $m * $n];
The || make a big difference in this situation.
Secondly, if you hit a situation where the syntax is confusing, use a
less conf
On Tue, Feb 19, 2013 at 6:40 PM, Levi Morrison wrote:
> > 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
On 19 Feb 2013, at 14:16, Leigh wrote:
>>
>>
>> I can understand that If you haven't tried to write a tool like
>> capistrano, rspec, chef, puppet, etc, etc in PHP you probably won't see
>> much value in implementing such things.
>>
>>
> Your RFC doesn't go to great lengths to explain the valu
>> 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
> 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 inten
On Tue, 19 Feb 2013 16:31:39 -, Marcello Duarte
wrote:
On 19 Feb 2013, at 16:29, Morfi wrote:
($n) => { echo $n; }
($n) use ($m) => { echo $n; }
Morfi, the problem pointed out already is when you have no arguments it
would be the same as the statement block, which would cause BC iss
On 19 Feb 2013, at 16:29, Morfi wrote:
> ($n) => { echo $n; }
> ($n) use ($m) => { echo $n; }
Morfi, the problem pointed out already is when you have no arguments it would
be the same as the statement block, which would cause BC issues.
> On Tue, Feb 19, 2013 at 8:11 PM, Levi Morrison wrote:
>
($n) => { echo $n; }
($n) use ($m) => { echo $n; }
On Tue, Feb 19, 2013 at 8:11 PM, Levi Morrison wrote:
> > IF (and I stress if) we add a a shorter anonymous function syntax I'd
> > like it to be geared towards one-liners because that's where the
> > current syntax feels really verbose, especial
Hello,
On Tue, Feb 19, 2013 at 6:09 PM, Levi Morrison wrote:
> There's already been an overwhelming negative reaction to this
> particular proposed syntax so I won't belabor the point much. In
> short, this is too similar to block statements and does have BC
> issues.
>
> --
>
> IF (and I stress
> IF (and I stress if) we add a a shorter anonymous function syntax I'd
> like it to be geared towards one-liners because that's where the
> current syntax feels really verbose, especially when you close over
> other variables:
>
> function ($n) use ($m) { return $m * $n; }
>
> Versus one poten
There's already been an overwhelming negative reaction to this
particular proposed syntax so I won't belabor the point much. In
short, this is too similar to block statements and does have BC
issues.
--
IF (and I stress if) we add a a shorter anonymous function syntax I'd
like it to be geared to
I also don't like the RFC proposed syntax. I have to say that I don't
really like those short magic-like syntax things in in other languages too.
If you work with them on the day-to-day basis and tools are built around
those concepts - it's one thing. In PHP syntax is mostly self-explanatory
and fo
>
>
> I can understand that If you haven't tried to write a tool like
> capistrano, rspec, chef, puppet, etc, etc in PHP you probably won't see
> much value in implementing such things.
>
>
Your RFC doesn't go to great lengths to explain the value either. Pretend
the reader has no experience with a
Hi Marcello,
Am 19.02.2013 um 14:51 schrieb Marcello Duarte :
> Thanks for the feedback. I get most people here don't appreciate the value of
> the feature.
>
> I can understand that If you haven't tried to write a tool like capistrano,
> rspec, chef, puppet, etc, etc in PHP you probably won't
Thanks for the feedback. I get most people here don't appreciate the value of
the feature.
I can understand that If you haven't tried to write a tool like capistrano,
rspec, chef, puppet, etc, etc in PHP you probably won't see much value in
implementing such things.
On 19 Feb 2013, at 13:19, D
Hello,
On Tue, Feb 19, 2013 at 2:57 PM, Marcello Duarte 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 really don't like syntax for this. It makes it h
Hi,
I don't really like to write every time a "long" 'function()', only for passing
a little callback like 'function ($v) { var_dump($v); }'...:
Nice proposal, but writing the last argument outside of the function call could
be confusing... An user-function is not a language construct (like whi
2013/2/19 Marcello Duarte :
> 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
BC break detected:
The {} would probably be a closure that is not assigned to anything
I also am not in favour of the syntax, it's too short and quirky. I'm
honestly fine with 'function()' it's very explicit
On Tue, Feb 19, 2013 at 1:20 PM, Anthony Ferrara wrote:
> Marcello,
>
>
> On Tue, Feb 19, 2013 at 7:57 AM, Marcello Duarte
> wrote:
>
> > Inspired by Sara, here is another RF
On 19 February 2013 13:57, Marcello Duarte 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,
>
>
Duh, I don't think function(){} is long.
--
Regards,
Mike
Marcello,
On Tue, Feb 19, 2013 at 7:57 AM, Marcello Duarte 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
On Tue, 19 Feb 2013, Marcello Duarte wrote:
> Inspired by Sara, here is another RFC, I finally got around to draft:
>
> https://wiki.php.net/rfc/short-syntax-for-anonymous-function
I'd be really reluctant to add this -- it's yet another (superfluous)
syntactical sugar, there is no patch, and ho
34 matches
Mail list logo