RE: [PHP-DEV] Simple Namespace Proposal

From: Date: Thu, 12 Jul 2007 07:59:09 +0000
Subject: RE: [PHP-DEV] Simple Namespace Proposal
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-30837@lists.php.net to get a copy of this message
> -----Original Message----- > From: Richard Lynch [mailto:ceo@l-i-e.com] > Sent: Thursday, July 12, 2007 4:45 AM > To: Stanislav Malyshev > Cc: Dmitry Stogov; 'Sebastian Bergmann'; internals@lists.php.net > Subject: Re: [PHP-DEV] Simple Namespace Proposal > > > On Mon, July 9, 2007 2:49 am, Stanislav Malyshev wrote: > >> +1 for braces. > >> > >> <?php > >> function > >> super_common_function_every_namespace_in_my_project_uses(){ > >> } > >> > >> namespace A::B { > >> function foo() { > >> //arcana of A::B stuff > >> } > >> } > >> ?> > > > > That's what I would like to avoid. Because if you need namespaces, > > then you want to segment your naming space. If you in the same time > > pollute the global space with non-namespaced function > names, the whole > > namespace > > business is kind of meaningless. Or you want your library not > > polluting > > global space, or you don't. > > But some functions ARE so super-common, across the board, > that I just plain don't want them buried in some namespace... > > I don't think I'm the only one on this... If you like some function to be in global namespace then don't put it into namespace file. Put it into separate file without namespace declaration. Thanks. Dmitry. > -- > Some people have a "gift" link here. > Know what I want? > I want you to buy a CD from some indie artist. > http://cdbaby.com/browse/from/lynch > Yeah, I get a buck. So? >

« previous php.internals (#30837) next »