Hi,
If at some point we would have multi-statement body arrow function, I would
assume that one option would be to have the closure done automatically, as
it is done now on the one-line arrow function.
If the values will not be implicitly captured, maybe a new syntax to
capture can be designed
Hello,
if you are upset; it's not the place here; your argument is efficiently
based on problems of indentation and handling commas
properly.
Moreover, but not least, you have no idea what a lambda is; if we admit it
what you propose; that is not feasible in PHP; why? because it would
require a
Den søn. 16. jun. 2019 kl. 02.48 skrev Wes :
>
> Hi Kalle. I hope it's feasible. Unfortunately I don't know much about
> internals. Any info on the matter would be very appreciated, though :P
>
> Anyway, if we can scan the function body to complain about `return null;`
> when the function is
Hi Kalle. I hope it's feasible. Unfortunately I don't know much about
internals. Any info on the matter would be very appreciated, though :P
Anyway, if we can scan the function body to complain about `return null;`
when the function is `:void`, surely we can scan just the very top of the
function
Welcome to the first inevitable patronizing message... No, my code is not
smelly. If something is smelling for you, check your armpits.
Importing 4 variables is not rare. If you think it's rare and should be
done differently, maybe you should first actually do something with
Closures before
Hello,
mostly, your argument in your rfc, is all about not finding a good syntax;
hence your have a terrible coding style
and you want to change the language for that.
```
$fn = function (
T1 $arg1_
, T1 $arg2_
, T1 $arg3_
, T1 $arg4_
, T1 $arg5_
, T1 $arg6_
) use ($var1, &$var2, &$var3,
Hi
Den søn. 16. jun. 2019 kl. 01.37 skrev Wes :
>
> Hi Kalle, I realize it's going to be a bit odd when binding by value. But
> it's not that hard to grasp.
>
> ```
> $a = 123;
> $closure = function(){
> use $a;
> echo $a; // 123
> };
> $a = 345;
> ```
Take this example:
function
Hi Kalle, I realize it's going to be a bit odd when binding by value. But
it's not that hard to grasp.
```
$a = 123;
$closure = function(){
use $a;
echo $a; // 123
};
$a = 345;
```
For this reason I specified it is mandatory to have `use` only at the very
top (otherwise, it would
Den søn. 16. jun. 2019 kl. 01.09 skrev Wes :
>
> Declaring variables or specifying which ones to import. Essentially it's
> the same thing, so what gives? It's PHP's syntax, IMHO, that makes the
> thing irritating to write :D
The proposed syntax was also that of the proposed syntax when closures
On Sun, Jun 16, 2019, 00:09 Wes wrote:
> Declaring variables or specifying which ones to import. Essentially it's
> the same thing, so what gives? It's PHP's syntax, IMHO, that makes the
> thing irritating to write :D
>
Just more AST to process, if you ask me
>
Declaring variables or specifying which ones to import. Essentially it's
the same thing, so what gives? It's PHP's syntax, IMHO, that makes the
thing irritating to write :D
On Sat, 15 Jun 2019 at 23:57, Marco Pivetta wrote:
> On Sat, Jun 15, 2019, 23:53 Wes wrote:
>
> > Hello PHP, I just published
> >
> > https://wiki.php.net/rfc/alternative-closure-use-syntax
> >
> > I would love your opinion on this
> >
> > I know it seems overkill and wrong to have two
Hey Wes,
On Sat, Jun 15, 2019, 23:53 Wes wrote:
> Hello PHP, I just published
>
> https://wiki.php.net/rfc/alternative-closure-use-syntax
>
> I would love your opinion on this
>
> I know it seems overkill and wrong to have two different syntaxes for the
> same thing, but I really believe that's
Hello PHP, I just published
https://wiki.php.net/rfc/alternative-closure-use-syntax
I would love your opinion on this
I know it seems overkill and wrong to have two different syntaxes for the
same thing, but I really believe that's all we need to fix one of the most
hated PHP syntax bits.
On Sat, Jun 15, 2019 at 9:02 AM Sebastian Bergmann
wrote:
> Am 13.06.2019 um 18:48 schrieb Nikita Popov:
> > An update on this: The last part of covariance support has landed [1] a
> few
> > days ago and is part of 7.4 alpha 1. As already described, full variance
> is
> > only supported in
Background:
In newer versions of PHP the syslog logging is forced to multiline logging
and it's not possible to turn this off. This is especially problematic
when you have a lot of logging and need to search and find connected lines
from a single call to syslog(). For example when debugging
Am 13.06.2019 um 18:48 schrieb Nikita Popov:
An update on this: The last part of covariance support has landed [1] a few
days ago and is part of 7.4 alpha 1. As already described, full variance is
only supported in conjunction with autoloading. When working in a single
file or with explicit
17 matches
Mail list logo