Re: [PHP-DEV] Re: hash BLAKE3

2020-10-30 Thread Levi Morrison via internals
On Fri, Oct 30, 2020 at 6:08 PM Hans Henrik Bergan wrote: > > hmm i'll try again, > made another PR: https://github.com/php/php-src/pull/6393 > > this PR is an alternative to https://github.com/php/php-src/pull/6358 > with some notable differences, > > - this PR is roughly 1700 SLOC, compared to #

[PHP-DEV] Re: hash BLAKE3

2020-10-30 Thread Hans Henrik Bergan
hmm i'll try again, made another PR: https://github.com/php/php-src/pull/6393 this PR is an alternative to https://github.com/php/php-src/pull/6358 with some notable differences, - this PR is roughly 1700 SLOC, compared to #6358 at roughly 31,000 SLOC - this PR only bundles the "portable C" vers

Re: [PHP-DEV] List of attributes

2020-10-30 Thread Theodore Brown
On Fri, Oct 30, 2020 at 2:28 PM Rowan Tommins wrote: > On 30/10/2020 18:47, Theodore Brown wrote: > > While passing all nested attributes as an array would at least enable > > consistent semantics, it has the notable disadvantage of preventing > > some use cases from being expressed in PHP's type

Re: [PHP-DEV] RFC: Support for multi-line arrow functions

2020-10-30 Thread Benjamin Morel
On Fri, 30 Oct 2020 at 19:07, Rowan Tommins wrote: > Just to be clear, the major gain here is not replacing the 10 characters > "function()" with the 7 characters "fn() =>", it is eliminating the list > of captured variables. So you would get equally clean code with a > "capture all" syntax, such

Re: [PHP-DEV] List of attributes

2020-10-30 Thread Paul Jones
> On Oct 30, 2020, at 14:28, Rowan Tommins > wrote: > >> 3. Vote to switch to a less verbose syntax [...] >>The downside is that... > > Let me stop you there. The downside is that a mob of Internals regulars will > come to your house and lynch you for asking

Re: [PHP-DEV] List of attributes

2020-10-30 Thread Rowan Tommins
On 30/10/2020 18:47, Theodore Brown wrote: While passing all nested attributes as an array would at least enable consistent semantics, it has the notable disadvantage of preventing some use cases from being expressed in PHP's type system. Specifically, how would you express that an attribute para

Re: [PHP-DEV] List of attributes

2020-10-30 Thread Theodore Brown
Hi Rowan and Nicolas (and internals), On Wed, Oct 28, 2020 at 12:57 PM Rowan Tommins wrote: > On 28/10/2020 16:58, Nicolas Grekas wrote: > > about why we'd need nested attributes, here is a discussion about > > nested validation constraints: > > https://github.com/symfony/symfony/issues/38503 >

Re: [PHP-DEV] RFC: Support for multi-line arrow functions

2020-10-30 Thread Rowan Tommins
On 29/10/2020 22:49, Benjamin Morel wrote: On Tue, 6 Oct 2020 at 14:09, G. P. B. wrote: Actually there is a precedent in PHP where braces don't create a new scope: $a = 1; { $a++; } echo $a; // 2 This is true. Indeed, in general, scope in PHP is not to the ne