Re: [PHP-DEV] [RFC][Discuss] Arrow Functions

2017-02-03 Thread Stephen Reay
On 4 Feb 2017, at 12:26, Levi Morrison wrote: >> So we should instead use syntax already used for bit wise OR, and further >> confuse the situation when the function has no parameters and reusing the >> logical OR operator. Brilliant. > > Excuse me, good sir, but can you tell me what the `&`

Re: [PHP-DEV] Re: [RFC][Discuss] Arrow Functions

2017-02-03 Thread Yasuo Ohgaki
On Sat, Feb 4, 2017 at 4:14 PM, Yasuo Ohgaki wrote: > >> fn(params) => expr >> |params| => expr >> >> I look forward to more discussion! >> > > It's unfortunate we cannot have HHVM/Hack syntax now > https://docs.hhvm.com/hack/lambdas/introduction > > but both > fn(params) => expr > |param

Re: [PHP-DEV] Re: [RFC][Discuss] Arrow Functions

2017-02-03 Thread Yasuo Ohgaki
Hi Levi, On Sat, Feb 4, 2017 at 2:53 AM, Levi Morrison wrote: > One more thing: I'd like to re-emphasize that the syntax that > JavaScript uses and the one that HHVM/Hack uses are ambiguous in the > current class of our grammar. The following will not work unless we > move to a more powerful gra

Re: [PHP-DEV] [Discussion] HKDF

2017-02-03 Thread Yasuo Ohgaki
On Sat, Feb 4, 2017 at 2:48 PM, Yasuo Ohgaki wrote: > string hash_hkdf(string algo, string ikm [, int length = 0, string info = > '', string salt = '']) I copied and pasted this proto from the source. It's wrong. Correct one is string hash_hkdf(string algo, string ikm [, int length = 0 [, stri

Re: [PHP-DEV] [Discussion] HKDF

2017-02-03 Thread Yasuo Ohgaki
On Sat, Feb 4, 2017 at 2:37 PM, Yasuo Ohgaki wrote: > On Sat, Feb 4, 2017 at 8:56 AM, Nikita Popov wrote: > >> You are free to prepare a patch, but your patch will not get merged. >> >> Your blatant disregard of any and all feedback you receive on your >> proposals is beginning to get on my nerv

Re: [PHP-DEV] [Discussion] HKDF

2017-02-03 Thread Yasuo Ohgaki
Hi Nikita, On Sat, Feb 4, 2017 at 8:56 AM, Nikita Popov wrote: > You are free to prepare a patch, but your patch will not get merged. > > Your blatant disregard of any and all feedback you receive on your > proposals is beginning to get on my nerves. This has played out again and > again, most r

Re: [PHP-DEV] [RFC][Discuss] Arrow Functions

2017-02-03 Thread Levi Morrison
> So we should instead use syntax already used for bit wise OR, and further > confuse the situation when the function has no parameters and reusing the > logical OR operator. Brilliant. Excuse me, good sir, but can you tell me what the `&` symbol means? I thought it meant reference but it's also

Re: [PHP-DEV] [RFC] [VOTE] Libsodium as a core extension in PHP 7.2

2017-02-03 Thread Yasuo Ohgaki
On Sat, Feb 4, 2017 at 10:22 AM, Alex Bowers wrote: > Would it not be possible for _both_ to be supported? It would be just an > alias I would vote for this!! Regards, -- Yasuo Ohgaki yohg...@ohgaki.net

Re: [PHP-DEV] [RFC][Discuss] Arrow Functions

2017-02-03 Thread Aaron Piotrowski
Hi Stephen, > On Feb 3, 2017, at 10:38 PM, Stephen Reay wrote: > > >> >> I absolutely agree that it's terrible… the point is that types (even >> potential future union types) can be used with short closures, but it >> certainly doesn't mean they should be. I don't think confusion with a >>

Re: [PHP-DEV] [RFC][Discuss] Arrow Functions

2017-02-03 Thread Stephen Reay
Hi Aaron, Sent from my iPhone > On 4 Feb 2017, at 10:33, Aaron Piotrowski wrote: > > >> On Feb 3, 2017, at 9:06 PM, Stephen Reay wrote: >> >> >>> On 4 Feb 2017, at 07:25, Aaron Piotrowski wrote: >>> >>> $callback = |int|float $x| => $x ** 2; >> >> Forget the parser, you're giving my eye

Re: [PHP-DEV] [RFC][Discuss] Arrow Functions

2017-02-03 Thread Aaron Piotrowski
> On Feb 3, 2017, at 9:06 PM, Stephen Reay wrote: > > >> On 4 Feb 2017, at 07:25, Aaron Piotrowski wrote: >> >> $callback = |int|float $x| => $x ** 2; > > Forget the parser, you're giving my eyes diabetes trying to read that. I absolutely agree that it's terrible… the point is that types (e

Re: [PHP-DEV] [RFC][Discuss] Arrow Functions

2017-02-03 Thread Stephen Reay
> On 4 Feb 2017, at 07:25, Aaron Piotrowski wrote: > > $callback = |int|float $x| => $x ** 2; Forget the parser, you're giving my eyes diabetes trying to read that. As has been said before, PHP is relatively verbose compared to other languages. That makes it slightly more characters to type,

Re: [PHP-DEV] [RFC] [VOTE] Libsodium as a core extension in PHP 7.2

2017-02-03 Thread Alex Bowers
On 4 February 2017 at 00:04, Nikita Popov wrote: > On Sat, Feb 4, 2017 at 12:54 AM, Scott Arciszewski > wrote: > > > On Fri, Feb 3, 2017 at 6:19 PM, Yasuo Ohgaki wrote: > > > > > Hi Scott and all, > > > > > > On Sat, Feb 4, 2017 at 5:44 AM, Scott Arciszewski > > > > wrote: > > > > > >> I've op

Re: [PHP-DEV] [RFC][Discuss] Arrow Functions

2017-02-03 Thread Aaron Piotrowski
> On Feb 3, 2017, at 2:34 PM, ilija.tov...@me.com wrote: > > I like the suggested syntax. The only drawback I see is that it inhibits the > future addition of union types for closures: > > |int | float $x| => $x > > Adding parentheses of course resolves the issue but looks a bit awkward: >

Re: [PHP-DEV] [RFC][Discuss] Arrow Functions

2017-02-03 Thread Aaron Piotrowski
> On Feb 3, 2017, at 11:53 AM, Levi Morrison wrote: > > One more thing: I'd like to re-emphasize that the syntax that > JavaScript uses and the one that HHVM/Hack uses are ambiguous in the > current class of our grammar. The following will not work unless we > move to a more powerful grammar and

Re: [PHP-DEV] [RFC] [VOTE] Libsodium as a core extension in PHP 7.2

2017-02-03 Thread Nikita Popov
On Sat, Feb 4, 2017 at 12:54 AM, Scott Arciszewski wrote: > On Fri, Feb 3, 2017 at 6:19 PM, Yasuo Ohgaki wrote: > > > Hi Scott and all, > > > > On Sat, Feb 4, 2017 at 5:44 AM, Scott Arciszewski > > wrote: > > > >> I've opened the vote for the libsodium RFC. > >> > >> https://wiki.php.net/rfc/li

Re: [PHP-DEV] Re: [RFC][Discuss] Arrow Functions

2017-02-03 Thread Björn Larsson
Den 2017-02-03 kl. 21:46, skrev Levi Morrison: On Fri, Feb 3, 2017 at 1:37 PM, Niklas Keller wrote: 2017-02-03 21:23 GMT+01:00 Levi Morrison : On Fri, Feb 3, 2017 at 12:18 PM, Andrea Faulds wrote: Hi David, David Rodrigues wrote: Hello folks! I just not understand why "function" should be

Re: [PHP-DEV] [Discussion] HKDF

2017-02-03 Thread Nikita Popov
On Sat, Feb 4, 2017 at 12:01 AM, Yasuo Ohgaki wrote: > Hi all, > > On Tue, Jan 17, 2017 at 4:01 PM, Yasuo Ohgaki wrote: > > > On Mon, Jan 16, 2017 at 8:16 PM, Andrey Andreev > wrote: > > > >> > >> On Mon, Jan 16, 2017 at 3:47 AM, Yasuo Ohgaki > wrote: > >> > >>> Nice function, I like it. > >>>

Re: [PHP-DEV] [RFC] [VOTE] Libsodium as a core extension in PHP 7.2

2017-02-03 Thread Scott Arciszewski
On Fri, Feb 3, 2017 at 6:19 PM, Yasuo Ohgaki wrote: > Hi Scott and all, > > On Sat, Feb 4, 2017 at 5:44 AM, Scott Arciszewski > wrote: > >> I've opened the vote for the libsodium RFC. >> >> https://wiki.php.net/rfc/libsodium >> >> See https://externals.io/thread/626 for the previous discussion t

[PHP-DEV] Re: [RFC][Discuss] Arrow Functions

2017-02-03 Thread Christoph M. Becker
On 03.02.2017 at 18:53, Levi Morrison wrote: > One more thing: I'd like to re-emphasize that the syntax that > JavaScript uses and the one that HHVM/Hack uses are ambiguous in the > current class of our grammar. The following will not work unless we > move to a more powerful grammar and parser cla

Re: [PHP-DEV] [RFC] [VOTE] Libsodium as a core extension in PHP 7.2

2017-02-03 Thread Yasuo Ohgaki
Hi Scott and all, On Sat, Feb 4, 2017 at 5:44 AM, Scott Arciszewski wrote: > I've opened the vote for the libsodium RFC. > > https://wiki.php.net/rfc/libsodium > > See https://externals.io/thread/626 for the previous discussion topics. > > The vote closes at 21:00 UTC (4 PM Eastern Time) next Fr

Re: [PHP-DEV] [Discussion] HKDF

2017-02-03 Thread Yasuo Ohgaki
Hi all, On Tue, Jan 17, 2017 at 4:01 PM, Yasuo Ohgaki wrote: > On Mon, Jan 16, 2017 at 8:16 PM, Andrey Andreev wrote: > >> >> On Mon, Jan 16, 2017 at 3:47 AM, Yasuo Ohgaki wrote: >> >>> Nice function, I like it. >>> Modified patch is committed to master >>> http://git.php.net/?p=php-src.git;a=

Re: [PHP-DEV] Re: [RFC][Discuss] Arrow Functions

2017-02-03 Thread Niklas Keller
2017-02-03 23:26 GMT+01:00 Michael Morris : > On Fri, Feb 3, 2017 at 3:37 PM, Niklas Keller wrote: > > > > > > There are more drawbacks to that syntax like no parameters looking pretty > > weird: || => > > > > > I can't think of a valid example of an arrow function without any arguments > at all.

Re: [PHP-DEV] Re: [RFC][Discuss] Arrow Functions

2017-02-03 Thread Fleshgrinder
On 2/3/2017 11:26 PM, Michael Morris wrote: > On Fri, Feb 3, 2017 at 3:37 PM, Niklas Keller wrote: >> >> >> There are more drawbacks to that syntax like no parameters looking pretty >> weird: || => >> >> > I can't think of a valid example of an arrow function without any arguments > at all. These

Re: [PHP-DEV] Re: [RFC][Discuss] Arrow Functions

2017-02-03 Thread Michael Morris
On Fri, Feb 3, 2017 at 3:37 PM, Niklas Keller wrote: > > > There are more drawbacks to that syntax like no parameters looking pretty > weird: || => > > I can't think of a valid example of an arrow function without any arguments at all. These functions are very simple iterators to plug into things

Re: [PHP-DEV] Re: [RFC][Discuss] Arrow Functions

2017-02-03 Thread Michael Morris
On Fri, Feb 3, 2017 at 3:34 PM, wrote: > I like the suggested syntax. The only drawback I see is that it inhibits > the future addition of union types for closures: > > |int | float $x| => $x > > Adding parentheses of course resolves the issue but looks a bit awkward: > > |(int | float) $

Re: [PHP-DEV] Re: [RFC][Discuss] Arrow Functions

2017-02-03 Thread Levi Morrison
On Fri, Feb 3, 2017 at 1:37 PM, Niklas Keller wrote: > 2017-02-03 21:23 GMT+01:00 Levi Morrison : >> >> On Fri, Feb 3, 2017 at 12:18 PM, Andrea Faulds wrote: >> > Hi David, >> > >> > David Rodrigues wrote: >> >> >> >> Hello folks! >> >> I just not understand why "function" should be abbreviated.

[PHP-DEV] [RFC] [VOTE] Libsodium as a core extension in PHP 7.2

2017-02-03 Thread Scott Arciszewski
I've opened the vote for the libsodium RFC. https://wiki.php.net/rfc/libsodium See https://externals.io/thread/626 for the previous discussion topics. The vote closes at 21:00 UTC (4 PM Eastern Time) next Friday. Scott Arciszewski Chief Development Officer Paragon Initiative Enterprises

Re: [PHP-DEV] Re: [RFC][Discuss] Arrow Functions

2017-02-03 Thread Niklas Keller
2017-02-03 21:23 GMT+01:00 Levi Morrison : > On Fri, Feb 3, 2017 at 12:18 PM, Andrea Faulds wrote: > > Hi David, > > > > David Rodrigues wrote: > >> > >> Hello folks! > >> I just not understand why "function" should be abbreviated. It's about > >> "how > >> less character better"? I don't see it

Re: [PHP-DEV] Re: [RFC][Discuss] Arrow Functions

2017-02-03 Thread ilija . tovilo
I like the suggested syntax. The only drawback I see is that it inhibits the future addition of union types for closures:     |int | float $x| => $x Adding parentheses of course resolves the issue but looks a bit awkward:     |(int | float) $x| => $x Apart from that I have nothing to complain

Re: [PHP-DEV] Re: [RFC][Discuss] Arrow Functions

2017-02-03 Thread Levi Morrison
On Fri, Feb 3, 2017 at 12:18 PM, Andrea Faulds wrote: > Hi David, > > David Rodrigues wrote: >> >> Hello folks! >> I just not understand why "function" should be abbreviated. It's about >> "how >> less character better"? I don't see it too much on PHP. I guess that is >> more simple keep what exis

Re: [PHP-DEV] Re: [RFC][Discuss] Arrow Functions

2017-02-03 Thread Andrea Faulds
Hi David, David Rodrigues wrote: Hello folks! I just not understand why "function" should be abbreviated. It's about "how less character better"? I don't see it too much on PHP. I guess that is more simple keep what exists current "function", that all knows about (that should be better than the

[PHP-DEV] GOOD Benchmark Results for PHP Master 2017-02-02

2017-02-03 Thread lp_benchmark_robot
Results for project PHP master, build date 2017-02-02 20:28:35-08:00 commit: 795a4c1 previous commit:3488cc9 revision date: 2017-02-02 18:35:35+01:00 environment:Haswell-EP cpu:Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz 2x18 cores, stepping 2, LLC 45 MB

Re: [PHP-DEV] Re: [RFC][Discuss] Arrow Functions

2017-02-03 Thread Levi Morrison
On Fri, Feb 3, 2017 at 11:46 AM, David Rodrigues wrote: > Or even, I too don't know why just ($x) => is an issue. There some possible > conflict why that? Yes, this conflicts with existing syntax. The following code snippets are valid today: [($x) => $x + $y] yield ($x) => $x + $y There

Re: [PHP-DEV] Re: [RFC][Discuss] Arrow Functions

2017-02-03 Thread David Rodrigues
Hello folks! I just not understand why "function" should be abbreviated. It's about "how less character better"? I don't see it too much on PHP. I guess that is more simple keep what exists current "function", that all knows about (that should be better than the next example): $mapped = array_map(

Re: [PHP-DEV] Re: [RFC][Discuss] Arrow Functions

2017-02-03 Thread Michael Morris
On Fri, Feb 3, 2017 at 12:53 PM, Levi Morrison wrote: > > > To that end, I'd like to gauge interest in a pure syntax based > > alternative that is similar to Rust and Ruby. > > Instead of: > > > > fn(params) => expr > > > > What about: > > > > |params| => expr > Looks great to me from up

[PHP-DEV] Re: [RFC][Discuss] Arrow Functions

2017-02-03 Thread Levi Morrison
On Fri, Feb 3, 2017 at 10:48 AM, Levi Morrison wrote: > On Mon, Jan 30, 2017 at 10:55 AM, Levi Morrison wrote: >> Bob Weinand and I are happy to announce that the [Arrow Functions][1] >> RFC is moving into the public discussion phase. We have been >> collaborating on this RFC for many months now

[PHP-DEV] Re: [RFC][Discuss] Arrow Functions

2017-02-03 Thread Levi Morrison
On Mon, Jan 30, 2017 at 10:55 AM, Levi Morrison wrote: > Bob Weinand and I are happy to announce that the [Arrow Functions][1] > RFC is moving into the public discussion phase. We have been > collaborating on this RFC for many months now and finally have a > proposal we are happy to discuss in the

[PHP-DEV] Re: [RFC][Discuss] Arrow Functions

2017-02-03 Thread Levi Morrison
On Mon, Jan 30, 2017 at 10:55 AM, Levi Morrison wrote: > Bob Weinand and I are happy to announce that the [Arrow Functions][1] > RFC is moving into the public discussion phase. We have been > collaborating on this RFC for many months now and finally have a > proposal we are happy to discuss in the

Re: [PHP-DEV] Re: [RFC][VOTE] Binary String Deprecation

2017-02-03 Thread Pedro Magalhães
Hi Nikita, The deprecation notice is not thrown during token_get_all() calls. Regards, Pedro On Fri, Feb 3, 2017 at 2:00 PM, Nikita Popov wrote: > On Fri, Feb 3, 2017 at 1:53 PM, Pedro Magalhães wrote: > > > Sorry, I missed the link to the RFC on the previous e-mail: > > https://wiki.php.net/

Re: [PHP-DEV] Re: [RFC][VOTE] Binary String Deprecation

2017-02-03 Thread Nikita Popov
On Fri, Feb 3, 2017 at 1:53 PM, Pedro Magalhães wrote: > Sorry, I missed the link to the RFC on the previous e-mail: > https://wiki.php.net/rfc/binary_string_deprecation > > Best regards, > Pedro Magalhães > I'm +1 on this, conditional on the deprecation not being thrown if token_get_all() is us

[PHP-DEV] Re: [RFC][VOTE] Binary String Deprecation

2017-02-03 Thread Pedro Magalhães
Sorry, I missed the link to the RFC on the previous e-mail: https://wiki.php.net/rfc/binary_string_deprecation Best regards, Pedro Magalhães

[PHP-DEV] [RFC][VOTE] Binary String Deprecation

2017-02-03 Thread Pedro Magalhães
Hello internals. After a *very* quiet period of discussion, I have now opened the vote for the Binary String Deprecation. There is a single vote for accepting or rejecting the deprecation. The voting phase will end on 2017-02-20 20:00 UTC. Best regards, Pedro Magalhães