Re: [PHP-DEV] [RFC] Patch for Union and Intersection Types

2016-04-26 Thread Fleshgrinder
On 4/26/2016 9:40 PM, Levi Morrison wrote: > I think he meant to post a different case: > > function (Foo $foo = null, $concrete_param); > > This is based on a conversation I've had with him elsewhere. > Gosh, I know such code. That should result in an error! :P -- Richard "Fleshgrinder"

Re: [PHP-DEV] [RFC] Patch for Union and Intersection Types

2016-04-26 Thread Levi Morrison
On Tue, Apr 26, 2016 at 1:34 PM, Fleshgrinder wrote: > On 4/26/2016 9:13 PM, Bob Weinand wrote: >> There's undefined (= not a value) and there's the value null. We just don't >> expose undefined to userland. [You see it when accessing undefined >> variables, which PHP

Re: [PHP-DEV] [RFC] Patch for Union and Intersection Types

2016-04-26 Thread Fleshgrinder
On 4/26/2016 9:13 PM, Bob Weinand wrote: > There's undefined (= not a value) and there's the value null. We just don't > expose undefined to userland. [You see it when accessing undefined variables, > which PHP converts to null with a notice for example.] > > Null is definitely a value. You can

Re: [PHP-DEV] [RFC] Patch for Union and Intersection Types

2016-04-26 Thread Bob Weinand
> Am 26.04.2016 um 19:41 schrieb Niklas Keller : > > 2016-04-26 19:33 GMT+02:00 Bob Weinand >: > > Am 26.04.2016 um 19:00 schrieb Niklas Keller > >: > > > > 2016-04-26 16:58

Re: [PHP-DEV] [RFC] Patch for Union and Intersection Types

2016-04-26 Thread Niklas Keller
2016-04-26 19:33 GMT+02:00 Bob Weinand : > > Am 26.04.2016 um 19:00 schrieb Niklas Keller : > > > > 2016-04-26 16:58 GMT+02:00 Bob Weinand : > > > >> Yeah, I'd like to not allow ?Foo in any case if union types pass. > >> > > > > What's

Re: [PHP-DEV] [RFC] Patch for Union and Intersection Types

2016-04-26 Thread Bob Weinand
> Am 26.04.2016 um 19:00 schrieb Niklas Keller : > > 2016-04-26 16:58 GMT+02:00 Bob Weinand : > >> Yeah, I'd like to not allow ?Foo in any case if union types pass. >> > > What's the reason for that? To me, null is neither a type nor should it be. I

Re: [PHP-DEV] [RFC] Patch for Union and Intersection Types

2016-04-26 Thread Levi Morrison
On Tue, Apr 26, 2016 at 11:20 AM, Levi Morrison wrote: > On Tue, Apr 26, 2016 at 11:00 AM, Niklas Keller wrote: >> 2016-04-26 16:58 GMT+02:00 Bob Weinand : >>> >>> Yeah, I'd like to not allow ?Foo in any case if union types pass. >>

Re: [PHP-DEV] [RFC] Patch for Union and Intersection Types

2016-04-26 Thread Levi Morrison
On Tue, Apr 26, 2016 at 11:00 AM, Niklas Keller wrote: > 2016-04-26 16:58 GMT+02:00 Bob Weinand : >> >> Yeah, I'd like to not allow ?Foo in any case if union types pass. > > > What's the reason for that? To me, null is neither a type nor should it be. On

Re: [PHP-DEV] [RFC] Patch for Union and Intersection Types

2016-04-26 Thread Niklas Keller
2016-04-26 16:58 GMT+02:00 Bob Weinand : > Yeah, I'd like to not allow ?Foo in any case if union types pass. > What's the reason for that? To me, null is neither a type nor should it be.

Re: [PHP-DEV] [RFC] Patch for Union and Intersection Types

2016-04-26 Thread Tom Worster
On 4/26/16 10:58 AM, Bob Weinand wrote: Yeah, I'd like to not allow ?Foo in any case if union types pass. If they fail, ?Foo is fine for me. I am persuaded that using the HHVM grammar is best. I personally don't like but it makes sense. If the Union RFC would propose only the | grammar and

Re: [PHP-DEV] [RFC] Patch for Union and Intersection Types

2016-04-26 Thread Tom Worster
On 4/26/16 12:21 PM, Christoph Becker wrote: On 26.04.2016 at 16:24, Dmitry Stogov wrote: At first, I'm glad this implementation is ready. At least it's possible to analyze its profs and cons. I'm also sure that both RFCs have their opponents and advocates. Now, I just like to make the final

Re: [PHP-DEV] [RFC] Patch for Union and Intersection Types

2016-04-26 Thread Christoph Becker
On 26.04.2016 at 16:24, Dmitry Stogov wrote: > At first, I'm glad this implementation is ready. > At least it's possible to analyze its profs and cons. > I'm also sure that both RFCs have their opponents and advocates. > > Now, I just like to make the final voting fair. I'm a bit confused, as

Re: [PHP-DEV] [RFC] Patch for Union and Intersection Types

2016-04-26 Thread Dominic Grostate
not good as well. >> > But this is the best option from my point, in case both pass we may make >> > additional voting with simple majority "Union" or "Nullable" or >> > "Union+Nullable". >> > >> > Thanks. Dmitry. >&

Re: [PHP-DEV] [RFC] Patch for Union and Intersection Types

2016-04-26 Thread Dominic Grostate
. > > But this is the best option from my point, in case both pass we may make > > additional voting with simple majority "Union" or "Nullable" or > > "Union+Nullable". > > > > Thanks. Dmitry. > > > > ________

Re: [PHP-DEV] [RFC] Patch for Union and Intersection Types

2016-04-26 Thread Joe Watkins
quot;Union+Nullable". > > Thanks. Dmitry. > > > From: Levi Morrison <morrison.l...@gmail.com> > Sent: Tuesday, April 26, 2016 17:47 > To: Dmitry Stogov > Cc: Bob Weinand; internals; Joe Watkins > Subject: Re: [PHP-DEV] [RFC] Pat

Re: [PHP-DEV] [RFC] Patch for Union and Intersection Types

2016-04-26 Thread Dmitry Stogov
2-3 weeks ago, and my politeness (or/and >>> stupidity) allowed you to pass your version for common discussion. >>> Now I can see your real reason :( >>> >>> Both "Union Types" and "Nullable Types" may make sense, and both should >>>

Re: [PHP-DEV] [RFC] Patch for Union and Intersection Types

2016-04-26 Thread Bob Weinand
our real reason :( >>>> >>>> Both "Union Types" and "Nullable Types" may make sense, and both should >>>> be voted at the same time. >>>> Tomorrow is time to start voting. Right? >>>> >>>> Thanks.

Re: [PHP-DEV] [RFC] Patch for Union and Intersection Types

2016-04-26 Thread Levi Morrison
tupidity) allowed you to pass your version for common discussion. >>> Now I can see your real reason :( >>> >>> Both "Union Types" and "Nullable Types" may make sense, and both should >>> be voted at the same time. >>> Tomorrow is ti

Re: [PHP-DEV] [RFC] Patch for Union and Intersection Types

2016-04-26 Thread Bob Weinand
wed you to pass your version for common discussion. >>> Now I can see your real reason :( >>> >>> Both "Union Types" and "Nullable Types" may make sense, and both should be >>> voted at the same time. >>> Tomorrow is time to start vot

Re: [PHP-DEV] [RFC] Patch for Union and Intersection Types

2016-04-26 Thread Dmitry Stogov
___ From: Levi Morrison <morrison.l...@gmail.com> Sent: Tuesday, April 26, 2016 02:37 To: internals Subject: [PHP-DEV] [RFC] Patch for Union and Intersection Types Internals, Joe Watkins and Bob Weinand have worked out a [proof-of-concept patch for union types][1]. Please go do

Re: [PHP-DEV] [RFC] Patch for Union and Intersection Types

2016-04-26 Thread Dmitry Stogov
<morrison.l...@gmail.com <mailto:morrison.l...@gmail.com>> Sent: Tuesday, April 26, 2016 02:37 To: internals Subject: [PHP-DEV] [RFC] Patch for Union and Intersection Types Internals, Joe Watkins and Bob Weinand have worked out a [proof-of-concept patch for unio

Re: [PHP-DEV] [RFC] Patch for Union and Intersection Types

2016-04-26 Thread Joe Watkins
>> > Both "Union Types" and "Nullable Types" may make sense, and both should >> be voted at the same time. >> > Tomorrow is time to start voting. Right? >> > >> > Thanks. Dmitry. >> > >> > >> > __

Re: [PHP-DEV] [RFC] Patch for Union and Intersection Types

2016-04-26 Thread Joe Watkins
; > Tomorrow is time to start voting. Right? > > > > Thanks. Dmitry. > > > > > > > > From: Levi Morrison <morrison.l...@gmail.com> > > Sent: Tuesday, April 26, 2016 02:37 > > To: internals > > Subject:

Re: [PHP-DEV] [RFC] Patch for Union and Intersection Types

2016-04-26 Thread Bob Weinand
ting. Right? > > Thanks. Dmitry. > > > ____________________ > From: Levi Morrison <morrison.l...@gmail.com> > Sent: Tuesday, April 26, 2016 02:37 > To: internals > Subject: [PHP-DEV] [RFC] Patch for Union and Intersection Types > > Inte

Re: [PHP-DEV] [RFC] Patch for Union and Intersection Types

2016-04-26 Thread Dmitry Stogov
On 04/26/2016 04:57 PM, Levi Morrison wrote: On Tue, Apr 26, 2016 at 7:33 AM, Dmitry Stogov wrote: hi Levi, It looks like your "work" on "Nullable Types" RFC was intended to win time for this patch and block "Nullable Types" again. Actually, you have been blocking it for

Re: [PHP-DEV] [RFC] Patch for Union and Intersection Types

2016-04-26 Thread Joe Watkins
ow I can see your real reason :( > > Both "Union Types" and "Nullable Types" may make sense, and both should be > voted at the same time. > Tomorrow is time to start voting. Right? > > Thanks. Dmitry. > > > ____________________ > F

Re: [PHP-DEV] [RFC] Patch for Union and Intersection Types

2016-04-26 Thread Levi Morrison
On Tue, Apr 26, 2016 at 7:33 AM, Dmitry Stogov wrote: > hi Levi, > > It looks like your "work" on "Nullable Types" RFC was intended to win time > for this patch and block "Nullable Types" again. > Actually, you have been blocking it for more than a year :( > > I'm going to push

[PHP-DEV] [RFC] Patch for Union and Intersection Types

2016-04-26 Thread Dmitry Stogov
uot; and "Nullable Types" may make sense, and both should be voted at the same time. Tomorrow is time to start voting. Right? Thanks. Dmitry. From: Levi Morrison <morrison.l...@gmail.com> Sent: Tuesday, April 26, 2016 02:37 To: interna

[PHP-DEV] [RFC] Patch for Union and Intersection Types

2016-04-25 Thread Levi Morrison
Internals, Joe Watkins and Bob Weinand have worked out a [proof-of-concept patch for union types][1]. Please go download it and experiment with it. A few things to note: * This patch includes intersection types. However, a type expression must be either a union type or an intersection type;