Hi!
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.
Congratulations, you have just discovered why OO exists :)
Objects are not always the answer.
If you refuse to use language construc
On 24.02.2010, at 15:11, Alain Williams wrote:
> On Wed, Feb 24, 2010 at 02:20:38PM +0300, Alexey Zakhlestin wrote:
>>
>> On 24.02.2010, at 13:28, Alain Williams wrote:
>
>>> Objects are not always the answer.
>>
>> in situation, which you described, objects are definitely the answer.
>> you h
On Wed, Feb 24, 2010 at 02:20:38PM +0300, Alexey Zakhlestin wrote:
>
> On 24.02.2010, at 13:28, Alain Williams wrote:
> > Objects are not always the answer.
>
> in situation, which you described, objects are definitely the answer.
> you have several functions, which share the same "state". that'
On 24.02.2010, at 13:28, Alain Williams wrote:
> 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.
>
On Wed, Feb 24, 2010 at 09:51:45AM +0100, Ferenc Kovacs wrote:
> maybe you want to pack your namespaced functions/classes with the
> global variables used with them.
+1
> Tyrael
--
Alain Williams
Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT
Lecturer.
+44 (0) 787 6
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
maybe you want to pack your namespaced functions/classes with the
global variables used with them.
Tyrael
On Wed, Feb 24, 2010 at 8:01 AM, Stanislav Malyshev wrote:
> Hi!
>
>> I never did understand *why* variables were not namespaced.
>
> If you have so many global vars you need to namespace th
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.
--
Stanislav Malyshev, Zend Software Architect
s...@zend.com http://www.zend.com/
(408)253-8829 MSN: s...@zend.com
--
PHP Internals
On Wed, Feb 24, 2010 at 01:00:28AM +0200, Ionut G. Stan wrote:
> ** namespaced functions don't make any difference, as variables aren't
> namespaced.
I never did understand *why* variables were not namespaced.
However, since 5.3 has been out for a while it might make things difficult to
make th