Re: [RFC][Vote] Typed Properties

From: Date: Wed, 25 May 2016 21:37:08 +0000
Subject: Re: [RFC][Vote] Typed Properties
References: 1 2 3 4 5 6 7 8 9  Groups: php.internals 
Request: Send a blank email to internals+get-93536@lists.php.net to get a copy of this message
Hi! > We already have the differentiation between IS_NULL and IS_UNDEF, why > not expose the latter to userland? I mean, JavaScript has it too and > people are able to understand it. IS_UNDEF is not a PHP type, it is an engine implementation flag. Now, adding a new type "undefined" would be a pretty big thing and then you'd need to deal with all the implications of it. Including a huge BC break of changing the type of all uninitialized variables, and the question of "what if I want my parameter to be able to accept undefined values" and so on. Huge can of worms, and all of it again just to have a type that is exactly like null but not null. While the only reason null exists is to do exactly what "undefined" is proposed to do. -- Stas Malyshev smalyshev@gmail.com

« previous php.internals (#93536) next »