ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-dev
php-dev
Re: [PHP-DEV] Simple Namespace Proposal
by Andrei Zmievski other posts by this author
Jul 9 2007 10:22AM messages near this date
Re: [PHP-DEV] Simple Namespace Proposal | Re: [PHP-DEV] Simple Namespace Proposal
I agree, FWIW.

-Andrei


On Jul 9, 2007, at 12: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.
> 
>  That's not the question of usage frequency - if you don't use one  
>  function and frequently use another, put them in different files  
>  for starters. And there's nothing preventing one from frequently  
>  using namespaced function - that's exactly why namespaces are  
>  proposed, to make frequent use of long names easier. That's why  
>  import exists.
> 
> > If you want to document "namespaces will never be nested" from the
> > get-go, that would be fine, of course.
> 
>  I see no reason to nest namespaces - since there's no relation  
>  between Foo::bar and Foo::bar::Baz as namespaces - they are  
>  different strings. Nesting is needed only when there is a relation,  
>  and I think that's just unnecessary complication, not worth the  
>  trouble.
>  -- 
>  Stanislav Malyshev, Zend Software Architect
>  stas@[...].com   http://www.zend.com/
>  (408)253-8829   MSN: stas@[...].com
> 
>  -- 
>  PHP Internals - PHP Runtime Development Mailing List
>  To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Thread:
Dmitry Stogov
Derick Rethans
Dmitry Stogov
Dmitry Stogov
dz
David Coallier
Guilherme Blanco
Stanislav Malyshev
Dmitry Stogov
Markus Fischer
Stanislav Malyshev
Stanislav Malyshev
Stanislav Malyshev
Giedrius D
Stanislav Malyshev
Giedrius D
Stanislav Malyshev
Giedrius D
Andrew Minerd
Stanislav Malyshev
David Coallier
Chris#
Dmitry Stogov
nicobn
Chris#
Chrish
Dmitry Stogov
Andrei Zmievski
Stefan Priebsch
Stanislav Malyshev
Richard Lynch
Dmitry Stogov
Stanislav Malyshev
Andrei Zmievski
Stefan Priebsch
Stanislav Malyshev
Stefan Priebsch
Richard Lynch
Stefan Priebsch
Jani Taskinen
David Coallier
Robert Cummings
Richard Lynch
Stanislav Malyshev
Lukas Kahwe Smith
Derick Rethans
Stefan Priebsch
Stanislav Malyshev
Derick Rethans
Stanislav Malyshev
Stanislav Malyshev
Stanislav Malyshev
Dmitry Stogov
Stefan Priebsch
Dmitry Stogov
Jeremy Privett
Stanislav Malyshev
nicobn
Tony Bibbs
Stanislav Malyshev
Stefan Priebsch
David Coallier
Rich Buggy
Stanislav Malyshev
Stefan Priebsch
David Coallier
Dmitry Stogov
Andrei Zmievski
Hans Lellelid
dz
Guilherme Blanco
Alexey Zakhlestin
Stanislav Malyshev
Jeremy Privett
Dmitry Stogov
Arpad Ray
Dmitry Stogov
Stanislav Malyshev
Markus Fischer
David Coallier
Stanislav Malyshev
Brian Moon
Dmitry Stogov
Stanislav Malyshev
Brian Moon
Stanislav Malyshev
Dmitry Stogov
Stefan Walk
Dmitry Stogov
David Coallier
Dmitry Stogov
Stefan Priebsch
Stanislav Malyshev
Stefan Priebsch
Larry Garfield
Dmitry Stogov
Larry Garfield
Dmitry Stogov
Derick Rethans
Dmitry Stogov
nicobn
Sebastian Bergmann
Dmitry Stogov
nicobn
Rasmus Lerdorf
Lucas Nealan
Stefan Priebsch
Rasmus Lerdorf
Stefan Priebsch
Sebastian Bergmann
Stefan Priebsch
Dmitry Stogov
Sebastian Bergmann
Stanislav Malyshev
davidc
Stanislav Malyshev

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved