Re: [RFC] Mixed Typehint

From: Date: Tue, 19 Dec 2017 20:59:45 +0000
Subject: Re: [RFC] Mixed Typehint
References: 1 2 3 4 5 6 7 8 9 10 11 12 13  Groups: php.internals 
Request: Send a blank email to internals+get-101393@lists.php.net to get a copy of this message
Am 19.12.2017 um 21:53 schrieb Fleshgrinder:
On 12/19/2017 8:01 PM, lists@rhsoft.net wrote:
but that's a different thing and both don't collide
It's not a different thing, that's what I try to tell you. They do not collide, of course not, but having the others is going to make mixed useless. In other words: if there is no type left to constraint to, it must be the top type. (Note that we already have the ability to constraint to the bottom type void.) Other languages invest quite some time into getting rid of annotating their top types (and type inversion) and we already have this functionality and you (not you in person but the collective here asking for it) want to introduce it. Stanislav is right, this type would be there for no technical reason. It is only for cosmetics or maybe to allow people to say "my codebase is fully type constrained". Which is literally a meaningless statement.
yes, it's mostly cosmetic (frankly even the OP statet this in the initial mail) but if that comes witout a noticebale price to pay why not? "It's a simple alias for the current behavior of no type and is fully interchangeable" sounds like it could even be optimized out at compile time of the script - so "you don't need it" is not much compelling for me

« previous php.internals (#101393) next »