[TYPO3-core] RFC: who-is-online for BE

Kasper Skårhøj kasper2006 at typo3.com
Thu Oct 26 22:46:41 CEST 2006


I agree with Martin,

Generally I don't use global declarations on variables (in modern  
code, you will of course still find it in older code) EXCEPT when I  
use a global more than 2-3 times and rather like to have it declared.  
So I think there should be a guideline.


HOWEVER A BIG WARNING: If you want to change working code here it  
requires an extremely clear mind! THis is NOT a trivial change! If  
you remove the declaration and overlook a variable you needed to  
change to $GLOBALS['...'] then you might not get an error immediately  
but introduced a tricky bug that is found much later! Whoever does  
these conversions has to be dead-sure he finds them all. I know how  
hard such a tedious task can be for my mind to get right!


- kasper


On Oct 26, 2006, at 13:25 , Martin Kutschker wrote:

> Dmitry Dulepov schrieb:
>> Hi!
>>
>> Martin Kutschker wrote:
>>> but please don to not force us to use $GLOBALS['TSFE'],
>>> $GLOBALS['TCA'] every single time.
>>
>> I do exactly this and see no problem with it.
>
> I said DO NOT FORCE US, so I vote for "global" in case the variable is
> used more than twice. Dropping all "global" does not make sense to me.
>
> Can we have Kasper's opinion on this before somebody goes and removes
> all of them in SVN?
>
> Masi
>
> _______________________________________________
> TYPO3-team-core mailing list
> TYPO3-team-core at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-team-core

- kasper

"Necessity is the mother of invention"
-------------------------------
kasper2006 at typo3.com | +45 20 999 115 | skype: kasperskaarhoej |  
gizmo: kasper_typo3








More information about the TYPO3-team-core mailing list