Re: [RFC][Vote] Typed Properties
| From: | Lester Caine | Date: | Wed, 25 May 2016 21:41:36 +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-93538@lists.php.net to get a copy of this message | ||
On 25/05/16 22:03, Fleshgrinder wrote:
> We already have the differentiation between IS_NULL and IS_UNDEF, why
> not expose the latter to userland?
Is this not simply a mistake?
The whole reason for null in my book is that it IS 'undefined'. We have
to have a flag for it since you can't easily identify it as a 'value'
stored im the variable. I think I can see why some people would want to
know if a variable has not been initialised, but null still fits that
requirement. When any variable is created it IS_NULL until such time as
a value is assigned - and a type of value established. In my book an
assignment will check for more than IS_INT so using typed variables is
of little advantage. But if I test for a value and find null then I know
it has not yet been initialised.
IS_UNDEF can't exist if there is no named variable to attach it to, so
user land gets an error that the variable does not exist.
--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk