On Wed, Nov 4, 2020, at 4:05 PM, Nuno Maduro wrote:
> Hey Larry,
>
> In my vision, this proposal is a good addition to PHP exactly as stated in
> this pull request (https://github.com/php/php-src/pull/6221): where only
> the "=> expr;" is introduced, and not the "fn".
>
> For visual consistency i
Hey Larry,
In my vision, this proposal is a good addition to PHP exactly as stated in
this pull request (https://github.com/php/php-src/pull/6221): where only
the "=> expr;" is introduced, and not the "fn".
For visual consistency in the future of PHP functions/methods, I think it's
important to d
On Tue, Oct 27, 2020, at 1:35 AM, Mike Schinkel wrote:
>
>
> > On Oct 26, 2020, at 10:23 AM, Michał Marcin Brzuchalski
> > wrote:
> >
> > Hi Larry,
> >
> > I'm wondering why we hadn't thought yet about reducing the need for $this
> > in this syntax.
> > Since arrow functions have an ability t
> On Oct 26, 2020, at 10:23 AM, Michał Marcin Brzuchalski
> wrote:
>
> Hi Larry,
>
> I'm wondering why we hadn't thought yet about reducing the need for $this
> in this syntax.
> Since arrow functions have an ability to capture variables defined in
> parent scope why not
> think of the same f
Hi David,
pon., 26 paź 2020 o 15:29 David Rodrigues
napisał(a):
> > The use of > instead of => could if possible indicate the method being
> void
> > and reduce even more:
>
> I think that for void, it could just identify it and not return nothing
> automatically.
>
> function a(): int => b(); /
> The use of > instead of => could if possible indicate the method being
void
> and reduce even more:
I think that for void, it could just identify it and not return nothing
automatically.
function a(): int => b(); // equivalents to function a(): int { return b();
}
function x(): void => y(); //
Hi Larry,
I'm wondering why we hadn't thought yet about reducing the need for $this
in this syntax.
Since arrow functions have an ability to capture variables defined in
parent scope why not
think of the same for class properties which will automatically reduce
short methods verbosity.
class X {
On Tue, Oct 20, 2020 at 8:20 PM Larry Garfield
wrote:
> A while back, Nikita mentioned that it should now be easy to offer an
> abbreviated syntax for functions that are just a single expression. I
> decided to take a crack at it and it turns out he was right. I thus offer
> this RFC:
>
> https
> On Oct 21, 2020, at 8:50 AM, Larry Garfield wrote:
>
> On Tue, Oct 20, 2020, at 11:08 PM, Mike Schinkel wrote:
>>> On Oct 20, 2020, at 2:19 PM, Larry Garfield wrote:
>>>
>>> A while back, Nikita mentioned that it should now be easy to offer an
>>> abbreviated syntax for functions that are ju
On Wed, Oct 21, 2020, at 5:17 PM, Rowan Tommins wrote:
> It occurred to me recently that maybe we could make "function" and "fn"
> synonyms everywhere, i.e. make both "$double = function($x) => $x *2;"
> and "$double = fn($x) use ($x) { return $x *2; };" valid. I'm not sure
> if that's desirabl
On 21/10/2020 21:53, Larry Garfield wrote:
A while back, Nikita mentioned that it should now be easy to offer an
abbreviated syntax for functions that are just a single expression. I
decided to take a crack at it and it turns out he was right. I thus
offer this RFC:
https://wiki.php.net/rfc/sh
Hi Larry Garfield,
> > A while back, Nikita mentioned that it should now be easy to offer an
> > abbreviated syntax for functions that are just a single expression. I
> > decided to take a crack at it and it turns out he was right. I thus
> > offer this RFC:
> >
> > https://wiki.php.net/rfc/
On Tue, Oct 20, 2020, at 1:19 PM, Larry Garfield wrote:
> A while back, Nikita mentioned that it should now be easy to offer an
> abbreviated syntax for functions that are just a single expression. I
> decided to take a crack at it and it turns out he was right. I thus
> offer this RFC:
>
> h
On Tue, Oct 20, 2020, at 11:08 PM, Mike Schinkel wrote:
> > On Oct 20, 2020, at 2:19 PM, Larry Garfield wrote:
> >
> > A while back, Nikita mentioned that it should now be easy to offer an
> > abbreviated syntax for functions that are just a single expression. I
> > decided to take a crack at
> On Oct 20, 2020, at 2:19 PM, Larry Garfield wrote:
>
> A while back, Nikita mentioned that it should now be easy to offer an
> abbreviated syntax for functions that are just a single expression. I
> decided to take a crack at it and it turns out he was right. I thus offer
> this RFC:
>
>
15 matches
Mail list logo