[RFC] Pure intersection types

From: Date: Tue, 23 Mar 2021 09:32:17 +0000
Subject: [RFC] Pure intersection types
Groups: php.internals 
Request: Send a blank email to internals+get-113712@lists.php.net to get a copy of this message
Greetings internals,

I'm presenting a new RFC to add support for pure intersection types to PHP.

An intersection type A&B means that the value must be of type A and of type
B at the same time.

I'm calling this proposal pure intersection types as there would be no
possibility of mixing intersection and union types, I'm leaving this as a
future scope.

The current draft is located on GitHub:
https://github.com/Girgias/intersection-types
And the current implementation PR is:
https://github.com/php/php-src/pull/6799

Looking forward to the feedback.

Best regards,

George P. Banyard


Thread (13 messages)

« previous php.internals (#113712) next »