On Tue, Feb 23, 2010 at 11:01:05PM -0800, Stanislav Malyshev wrote:
> Hi!
> 
> >I never did understand *why* variables were not namespaced.
> 
> If you have so many global vars you need to namespace them, you should 
> not use global vars.

It is not a question of number -- you may have some module where the
functions need to share a couple of variables between themselves, eg a file 
handle.
If variables could be private to a namespace then you would be confident that
you would not get a variable name collision with some other, independently 
developed,
module.

Objects are not always the answer.

-- 
Alain Williams
Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT 
Lecturer.
+44 (0) 787 668 0256  http://www.phcomp.co.uk/
Parliament Hill Computers Ltd. Registration Information: 
http://www.phcomp.co.uk/contact.php
Past chairman of UKUUG: http://www.ukuug.org/
#include <std_disclaimer.h>

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

Reply via email to