On Mon, Feb 25, 2013 at 1:17 PM, Clint Priest cpri...@zerocue.com wrote:
On 2/21/2013 5:17 AM, David Muir wrote:
On 21/02/2013, at 6:12 AM, Lazare Inepologlou linep...@gmail.com wrote:
Long code is not always equivalent to readable code. A shorter syntax
could
improve readability in
On 2/21/2013 5:17 AM, David Muir wrote:
On 21/02/2013, at 6:12 AM, Lazare Inepologlou linep...@gmail.com 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; } );
On 21/02/2013, at 6:12 AM, Lazare Inepologlou linep...@gmail.com wrote:
2013/2/20 Sanford Whiteman swhitemanlistens-softw...@cypressintegrated.com
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
On Thu, Feb 21, 2013 at 4:17 AM, David Muir davidkm...@gmail.com wrote:
On 21/02/2013, at 6:12 AM, Lazare Inepologlou linep...@gmail.com wrote:
2013/2/20 Sanford Whiteman swhitemanlistens-softw...@cypressintegrated.com
It still looks like some random characters bashed together by a monkey
2013/2/21 Levi Morrison morrison.l...@gmail.com
On Thu, Feb 21, 2013 at 4:17 AM, David Muir davidkm...@gmail.com wrote:
On 21/02/2013, at 6:12 AM, Lazare Inepologlou linep...@gmail.com
wrote:
2013/2/20 Sanford Whiteman
swhitemanlistens-softw...@cypressintegrated.com
It still looks
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 like some random
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
2013/2/20 Sanford Whiteman swhitemanlistens-softw...@cypressintegrated.com
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
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
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 how
Marcello,
On Tue, Feb 19, 2013 at 7:57 AM, Marcello Duarte mdua...@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
On 19 February 2013 13:57, Marcello Duarte mdua...@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,
Duh, I don't think function(){} is long.
--
Regards,
Mike
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 ircmax...@gmail.comwrote:
Marcello,
On Tue, Feb 19, 2013 at 7:57 AM, Marcello Duarte mdua...@inviqa.com
wrote:
2013/2/19 Marcello Duarte mdua...@inviqa.com:
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:
?php
{
echo foo\n;
return bar;
};
echo baz\n;
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
Hello,
On Tue, Feb 19, 2013 at 2:57 PM, Marcello Duarte mdua...@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 really don't like syntax for this. It
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,
Hi Marcello,
Am 19.02.2013 um 14:51 schrieb Marcello Duarte mdua...@inviqa.com:
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
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 any of
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
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
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 potential
Hello,
On Tue, Feb 19, 2013 at 6:09 PM, Levi Morrison morrison.l...@gmail.com 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.
--
($n) = { echo $n; }
($n) use ($m) = { echo $n; }
On Tue, Feb 19, 2013 at 8:11 PM, Levi Morrison morrison.l...@gmail.comwrote:
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
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
On Tue, 19 Feb 2013 16:31:39 -, Marcello Duarte mdua...@inviqa.com
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
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
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
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 value either.
On Tue, Feb 19, 2013 at 6:40 PM, Levi Morrison morrison.l...@gmail.comwrote:
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
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 confusing
On 19 February 2013 16:46, Marcello Duarte mdua...@inviqa.com 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
On 19 Feb 2013, at 17:32, Leigh wrote:
On 19 February 2013 16:46, Marcello Duarte mdua...@inviqa.com 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
@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
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
35 matches
Mail list logo