Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47047 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82645 invoked from network); 24 Feb 2010 10:28:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Feb 2010 10:28:22 -0000 Authentication-Results: pb1.pair.com smtp.mail=addw@phcomp.co.uk; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=addw@phcomp.co.uk; sender-id=permerror Received-SPF: pass (pb1.pair.com: domain phcomp.co.uk designates 78.32.209.33 as permitted sender) X-PHP-List-Original-Sender: addw@phcomp.co.uk X-Host-Fingerprint: 78.32.209.33 freshmint.phcomp.co.uk Linux 2.6 Received: from [78.32.209.33] ([78.32.209.33:61388] helo=mint.phcomp.co.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E2/43-64178-24FF48B4 for ; Wed, 24 Feb 2010 05:28:20 -0500 Received: from addw by mint.phcomp.co.uk with local (Exim 4.63) (envelope-from ) id 1NkETU-0003O7-Vb; Wed, 24 Feb 2010 10:28:13 +0000 Date: Wed, 24 Feb 2010 10:28:12 +0000 To: Stanislav Malyshev Cc: "Ionut G. Stan" , internals@lists.php.net Message-ID: <20100224102812.GB4565@phcomp.co.uk> Mail-Followup-To: Stanislav Malyshev , "Ionut G. Stan" , internals@lists.php.net References: <4B54FC87.8070106@zend.com> <4F.56.22457.408955B4@pb1.pair.com> <4B55D850.8000604@zend.com> <4B808294.1070801@keryx.se> <4B844DBA.4050804@zend.com> <4B845E0C.7040005@gmail.com> <20100223232328.GE16412@phcomp.co.uk> <4B84CEB1.2070400@zend.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B84CEB1.2070400@zend.com> User-Agent: Mutt/1.4.2.2i Organization: Parliament Hill Computers Ltd Subject: Re: [PHP-DEV] variables in namespaces, was: On closures and lamdba From: addw@phcomp.co.uk (Alain Williams) 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