[development] namespaced global variables [WAS: Drupal 6.2 theme system standalone]
Larry Garfield
larry at garfieldtech.com
Sat Jun 14 16:42:55 UTC 2008
Classes make really lousy namespaces. That is semantically a wrong use of
classes, and also hurts the new Drupal 7 registry. Classes should be used
for tight-coupling bundles of code and data. They are not a poor man's
namespace.
On Saturday 14 June 2008, Bob Pepin wrote:
> On a side note, the next person designing a callback interface should
> also keep in mind that call_user_func can take array($classname,
> $methodname) as first argument. Would have avoided all the name
> clashes with callbacks in themes right now.
>
> On Sat, Jun 14, 2008 at 17:00, Syscrusher <syscrusher at 4th.com> wrote:
> > On Sat, 2008-06-14 at 16:47 +0200, Adrian Rossouw wrote:
> >> Dries didn't like the idea when i floated it 5 years ago, but maybe
> >> it's time =)
> >
> > If we're talking about that kind of a major change, is it time to
> > revisit the question of whether Drupal should use PHP's OOP features,
> > now that the PHP language has better OO support than it did several
> > years ago?
> >
> > I realize this has been discussed before, and I'm not trying to open a
> > flame war here. If the answer is "Hell no!", then I will not start a
> > fight about it. I just thought we might be trying with things like
> > home-grown contexts to reinvent a wheel that's already solved by
> > classes.
> >
> > Kind regards,
> >
> > Scott
> >
> > --
> > Syscrusher <syscrusher at 4th.com>
--
Larry Garfield AIM: LOLG42
larry at garfieldtech.com ICQ: 6817012
"If nature has made any one thing less susceptible than all others of
exclusive property, it is the action of the thinking power called an idea,
which an individual may exclusively possess as long as he keeps it to
himself; but the moment it is divulged, it forces itself into the possession
of every one, and the receiver cannot dispossess himself of it." -- Thomas
Jefferson
More information about the development
mailing list