Re: Re: Improving PHP's type system
| From: | Fleshgrinder | Date: | Sun, 17 Apr 2016 10:29:07 +0000 |
| Subject: | Re: Re: Improving PHP's type system | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-92379@lists.php.net to get a copy of this message | ||
On 4/17/2016 12:22 PM, Lin Yo-An wrote:
> On Sun, Apr 17, 2016 at 6:06 AM, Bastian Schneider <
> bastian.schneider@commerce-plus.com> wrote:
>
>> Just a quick thought.
>>
>>
>> union Iterable {
>> use array;
>> use ArrayAccess;
>> use Traversable;
>> }
>>
>
> I think this example creates another meaning on the "use" syntax, which
> make "use" context depended.
>
> The "use" statement is already used to "create an class name alias in the
> current namespace." and this makes "use" confusing.
>
Especially since its not needed at all. HHVM already solved most of
these issues extremely nicely:
- https://docs.hhvm.com/hack/types/type-system
- https://docs.hhvm.com/hack/type-aliases/introduction
- https://docs.hhvm.com/hack/shapes/introduction
We want the same but do not want to copy?!?
--
Richard "Fleshgrinder" Fussenegger
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc