Yes, pretending that it is currently consistent is the problem I think.
By introducing the new function we solve the inconsistency. True there
are ways around this, such as get_defined_vars(). Interestingly, yet
another inconsistency is that get_defined_vars() also returns a variable
with a null value. Wouldn't it just be simpler to acquiesce to the fact
that null wasn't implemented as you intended and thus has a greater
scope of usage now than originally expected? Part of the evolutionary
process of any entity is when it exceeds its expectations. Also I'm
guessing that get_defined_vars() does not return a reference to an
already existing array and thus would be like using a pile driver to
hammer a nail in -- correct me if I'm wrong since efficiency wise I'm
happy to use that method provided I'm not copying the whole array.

Cheers,
Rob.


On Sat, 2003-08-16 at 17:42, Lars Torben Wilson wrote:
> On Sat, 2003-08-16 at 14:41, Zeev Suraski wrote:
> > At 16:53 16/08/2003, Robert Cummings wrote:
> > >So it seems to me that a null value does not define the non-existence of
> > >a value, but is itself actually a value. And this as far as I am
> > >concerned is quite valid.
> > 
> > Ok, but it still doesn't change the fact that null is not a value :)  The 
> > fact we couldn't make the implementation perfect doesn't change that in any 
> > way.
> > I mentioned ways to implement the desired behavior, others also mentioned 
> > other ways - but there's no way I'd support adding functionality that will 
> > encourage inconsistency in the language.
> > 
> > Zeev
> 
> But the change would make it more consistent, by recognizing that a
> variable with a NULL value is still defined. Pretending that $foo =
> null and unset($foo) are the same thing is quite inconsistent and
> confusing for many, when there are ways (i.e. get_defined_vars()) to
> prove that they are not the same. 
> 
> 
> -- 
>  Torben Wilson <[EMAIL PROTECTED]>                        +1.604.709.0506
>  http://www.thebuttlesschaps.com          http://www.inflatableeye.com
>  http://www.hybrid17.com                  http://www.themainonmain.com
>  -----==== Boycott Starbucks!  http://www.haidabuckscafe.com ====-----
> 
> 
> 
> 
> -- 
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
-- 
.---------------------------------------------.
| Worlds of Carnage - http://www.wocmud.org   |
:---------------------------------------------:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the  |
| stuff of nightmares grasp for your soul.    |
`---------------------------------------------'

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to