Re: [PHP-DEV] [RFC] Partial function application

2021-05-18 Thread David Gebler
On Tue, May 18, 2021 at 11:02 PM Levi Morrison wrote: > Some of the RFC authors have been discussing this a lot based on > feedback. In a [previous message][1] I said we would message the list > when it's ready for re-review. It's still not ready, but we seem to be > driving towards consensus. >

Re: [PHP-DEV] [RFC] Partial function application

2021-05-18 Thread Levi Morrison via internals
> I don't know what the answer is here, I'm reading through the entire thread > and RFC again and trying to better formulate in my mind how I'd [like to] > reason about this in terms of syntax. But the more I think about it, the > more I realise much as I loved the idea when I first read the RFC, n

Re: [PHP-DEV] [RFC] Partial function application

2021-05-18 Thread David Gebler
On Tue, May 18, 2021 at 9:51 PM Rowan Tommins wrote: > Hi David, > > Did you see my message yesterday about the two mental models of the > feature? https://externals.io/message/114157#114492 > > Your expectation there is in line with the "start with an empty closure > and add things" model; the b

Re: [PHP-DEV] [RFC] Partial function application

2021-05-18 Thread Rowan Tommins
Hi David, On 18/05/2021 20:56, David Gebler wrote: function foo(int $a, int $b, int ...$p) { ... } $partial = foo(?, 10); $partial(5, 15, 25); Intuitively, because the existing convention is extra unused parameters in user defined functions are silently ignored, I think I would expect the abov

Re: [PHP-DEV] [RFC] Partial function application

2021-05-18 Thread David Gebler
On Tue, May 18, 2021 at 2:45 PM Larry Garfield wrote: > User-space functions have always accepted more arguments than they're > defined with. They just get dropped off the end silently, unless you use > func_get_args() or variadics. While I know not everyone likes that > "feature", it means tha

Re: [PHP-DEV] [RFC] [Draft] Add RNG extension and deprecate mt_srand()

2021-05-18 Thread Rowan Tommins
On 18/05/2021 17:19, Go Kudo wrote: I have created a draft of the RFC. https://wiki.php.net/rfc/rng_extension Hi, At a glance, I think this looks like a good clear approach. I think deprecating mt_srand makes sense, but could do with a heading to make sure it's not overlooked, and include

Re: [PHP-DEV] [RFC] [Draft] Add RNG extension and deprecate mt_srand()

2021-05-18 Thread Kamil Tekiela
Hi Go Kudo, I think this proposal is much better than the one before. I believe we need such functionality in PHP. I have some questions I would like you to consider: 1. I'm still not a fan of exposing the algorithms as separate classes in PHP. Their names are confusing and I don't see how exposin

[PHP-DEV] [RFC] [Draft] Add RNG extension and deprecate mt_srand()

2021-05-18 Thread Go Kudo
Hello internals. I have created a draft of the RFC. https://wiki.php.net/rfc/rng_extension This RFC is a proposal to implement the old object scope RNG in PHP. You can read about the discussion so far below. - https://externals.io/message/114378 - https://externals.io/message/112819 I believe

Re: [PHP-DEV] [RFC] Partial function application

2021-05-18 Thread Larry Garfield
On Mon, May 17, 2021, at 11:14 PM, Paul Crovella wrote: > On Fri, May 14, 2021 at 4:44 PM Aaron Piotrowski wrote: > > > > My issue is the dual-meaning of ? in the current proposal. In `foo(?, 42)`, > > the ? represents a single argument, but adding a trailing ? (such as in > > `foo(?, 42, ?)`) r

Re: [PHP-DEV] Re: [RFC] [Discussion] Final constants

2021-05-18 Thread Guilliam Xavier
On Tue, May 18, 2021 at 1:23 AM Gabriel Caruso wrote: > On Sun, 16 May 2021, 15:52 Máté Kocsis, wrote: > > > As I've fully finished the implementation, I intend to bring this to a > vote > > on Wednesday if no new concerns come up (besides the usual question about > > the usefulness of the featu