Re: [PHP-DEV] [RFC] [Vote] Callable types (now: Callable prototypes)

2016-05-24 Thread Nikita Nefedov
On Tue, 24 May 2016 02:24:12 +0300, Dan Ackroyd wrote: Hi Nikita, On 23 May 2016 at 15:27, Nikita Nefedov wrote: With this message I'd like to go to vote with the Callable prototypes RFC targeted at 7.1: https://wiki.php.net/rfc/callable-types

Re: [PHP-DEV] [RFC] [Vote] Callable types (now: Callable prototypes)

2016-05-24 Thread Nikita Nefedov
On Mon, 23 May 2016 22:59:10 +0300, Markus Fischer wrote: Hello Nikita, On 23.05.16 21:27, Nikita Nefedov wrote: When you pass an `int` to a `string` type parameter in weak mode it's being coerced to the needed type (not just directly passed). This is quite complex,

Re: [PHP-DEV] [RFC] [Vote] Callable types (now: Callable prototypes)

2016-05-23 Thread Nikita Nefedov
On Mon, 23 May 2016 22:52:18 +0300, Levi Morrison wrote: On Mon, May 23, 2016 at 1:19 PM, Nikita Nefedov wrote: On 23 May 2016, at 19:31, Levi Morrison wrote: A quick question before I vote: do callable prototypes allow for default

Re: [PHP-DEV] [RFC] [Vote] Callable types (now: Callable prototypes)

2016-05-23 Thread Dan Ackroyd
Hi Nikita, On 23 May 2016 at 15:27, Nikita Nefedov wrote: > With this message I'd like to go to vote > with the Callable prototypes RFC targeted at 7.1: > https://wiki.php.net/rfc/callable-types To explain my vote - I think we definitely need to be able to specify the

Re: [PHP-DEV] [RFC] [Vote] Callable types (now: Callable prototypes)

2016-05-23 Thread Markus Fischer
Hello Nikita, On 23.05.16 21:27, Nikita Nefedov wrote: > When you pass an `int` to a `string` type parameter in weak mode > it's being coerced to the needed type (not just directly passed). > > This is quite complex, because you'd need to copy zend_function > and all its members (without

Re: [PHP-DEV] [RFC] [Vote] Callable types (now: Callable prototypes)

2016-05-23 Thread Levi Morrison
On Mon, May 23, 2016 at 1:19 PM, Nikita Nefedov wrote: > >> On 23 May 2016, at 19:31, Levi Morrison wrote: >> >>> On Mon, May 23, 2016 at 8:27 AM, Nikita Nefedov wrote: >>> Evening internals, >>> >>> With this message I'd like to go to vote

Re: [PHP-DEV] [RFC] [Vote] Callable types (now: Callable prototypes)

2016-05-23 Thread Nikita Nefedov
Hi Bob, When you pass an `int` to a `string` type parameter in weak mode it's being coerced to the needed type (not just directly passed). This is quite complex, because you'd need to copy zend_function and all its members (without changing the original zend_function). I would love to support

Re: [PHP-DEV] [RFC] [Vote] Callable types (now: Callable prototypes)

2016-05-23 Thread Nikita Nefedov
> On 23 May 2016, at 19:31, Levi Morrison wrote: > >> On Mon, May 23, 2016 at 8:27 AM, Nikita Nefedov wrote: >> Evening internals, >> >> With this message I'd like to go to vote >> with the Callable prototypes RFC targeted at 7.1: >>

Re: [PHP-DEV] [RFC] [Vote] Callable types (now: Callable prototypes)

2016-05-23 Thread Bob Weinand
Hey, I have a question regarding strict/weak types. Currently, you cannot pass a callable function(string $foo) {} to a signature requiring (callable(int)), if I understood the code correctly. But weak types actually should allow that as it's totally fine to pass an integer to a string in

Re: [PHP-DEV] [RFC] [Vote] Callable types (now: Callable prototypes)

2016-05-23 Thread Levi Morrison
On Mon, May 23, 2016 at 8:27 AM, Nikita Nefedov wrote: > Evening internals, > > With this message I'd like to go to vote > with the Callable prototypes RFC targeted at 7.1: > https://wiki.php.net/rfc/callable-types > > We've renamed it (previously was "Callable types") as RFC

[PHP-DEV] [RFC] [Vote] Callable types (now: Callable prototypes)

2016-05-23 Thread Nikita Nefedov
Evening internals, With this message I'd like to go to vote with the Callable prototypes RFC targeted at 7.1: https://wiki.php.net/rfc/callable-types We've renamed it (previously was "Callable types") as RFC names often dictate how users will call the feature and I want it to be more