Union Class Types (was Union Type (singular) straw man proposal)
| From: | Mike Schinkel | Date: | Fri, 06 Sep 2019 04:22:02 +0000 |
| Subject: | Union Class Types (was Union Type (singular) straw man proposal) | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-106885@lists.php.net to get a copy of this message | ||
Hi Côme,
> This example is really confusing me more than anything else.
Thank you very much for your feedback. You illustrated perfectly why I should not have produced
that proposal in haste.
Your confusion was due to my first draft errors, which thanks to your feedback I have hopefully had
a chance to correct. I effectively rewrote and extended the proposal which you should be able to
find at the same URL:
https://gist.github.com/mikeschinkel/50aec7094f5643223d28674639f9f117
<https://gist.github.com/mikeschinkel/50aec7094f5643223d28674639f9f117>
I would be greatly appreciative if you could give is a second look.
> All in all I do not understand the benefits of this approach compared to Nikita’s RFC.
I have moved the benefits to the beginning of the document and expanded the list I elaborate on.
Hopefully they will be clear now?
-Mike Schinkel
P.S. Someone graciously emailed me off list and mentioned that my comments regarding Nikitia sounded
like a criticism. If anyone else thought the same — and especially Nikita — please understand I
was attempting to praise him but trying to do so in a humorous manner.
As the person who emailed me made me realize, sometimes my humor may not translate via a mailing
list and especially not for those who are not native English speakers. So I will do my best to avoid
using humor on the list in the future.
To be clear, I am in awe of Nikita and both his abilities and efforts to benefit the PHP community
and greatly appreciate his efforts. I hope that clarifies my earlier intent.
> On Sep 5, 2019, at 4:51 AM, Côme Chilliet wrote:
>
> Why does the class Number in the example has a $number property and use
> $this->number->value() rather than $this->value() ?
>
> What is the difference between its getNumber method and its value method?
>
> Is $this->number and $this->number->number pointing the same object or is
> $this->number->number NULL?
>
> This example is really confusing me more than anything else.
>
> The "function showNumber" example is using $this->number instead of $number I
> think.
>
> All in all I do not understand the benefits of this approach compared to Nikita’s RFC.
> What does this allow you to do that you cannot do without?
>
> Côme