Re: Re: Question about superglobals
| From: | Sam Barrow | Date: | Sat, 17 Nov 2007 04:18:36 +0000 |
| Subject: | Re: Re: Question about superglobals | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-33200@lists.php.net to get a copy of this message | ||
You say that superglobals were not designed to be user defined, think
about it, the concept of a superglobal is present in C and C++, two of
the maturest and strictest languages around.
On Fri, 2007-11-16 at 22:34 -0500, Sean Coates wrote:
> > So the idea now is to inappropriately force everything to be a class?
> >>
>
> It is appropriate. That's how it was designed. Obviously superglobals
> were not designed to be user-definable.
>
> If configuration is defined in a class, then as a maintainer, you can
> easily determine where the data was defined (unless you do things are
> even less appropriate), but simply looking up the class.
>
> Globals (and superglobals) can be defined _anywhere_. This makes them
> a maintenance nightmare, and a very inappropriate place to store data
> such as configuration information.
>
> S
>