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 Jeremy Privett other posts by this author
Jul 8 2007 12:18PM messages near this date
RE: [PHP-DEV] Simple Namespace Proposal | Re: [PHP-DEV] Simple Namespace Proposal
I'm going to have to agree with Larry, here. If there's no *real* namespace implementation i
n PHP6, there may as well not be one at all. Take a look around at the countless other langu
ages that already have this functionality. You're gimping the language further if you implem
ent namespaces without such core functionality as this.

Regards,
Jeremy

-----Original Message-----
From: Larry Garfield [mailto:larry@[...].com] 
Sent: Sunday, July 08, 2007 1:13 PM
To: internals@[...].net
Subject: Re: [PHP-DEV] Simple Namespace Proposal

Yes, it would be.  What's the problem with that?  

I'm coming from the background of a plugin-based architecture where plugins 
routinely add functions that would, conceptually, "exist" in a different 
namespace.  

That would require having both multiple namespaces per file and multiple files 
per namespace.  If we can't do that then we're back to using static classes 
as if they were namespaces.

On Sunday 08 July 2007, Dmitry Stogov wrote:
>  -1  for braces and multiple namespaces per file
> 
>  Braces will allow define something outside namespace and I like to avoid
>  this possibility.
>  In the following "correct" example function bar() is defined in global
>  namespace.
> 
>  <?php
>  namespace A::B {
> 
>    function foo() {
>    }
> 
>  }
> 
>  function bar() {
>  }
>  ?>
> 
>  Dmitry.
> 
>  > -----Original Message-----
>  > From: news [mailto:news@[...].org] On Behalf Of Sebastian Bergmann
>  > Sent: Sunday, July 08, 2007 10:13 AM
>  > To: internals@[...].net
>  > Subject: Re: [PHP-DEV] Simple Namespace Proposal
>  >
>  > Nicolas Bérard-Nault schrieb:
>  > > +1 for braces around namespace definition.
>  >
>  >  -0 on that, because there is no clear "standard" with regard
>  > to how  other programming languages solve this.
>  >
>  >  Java does not require braces with its "package" construct
>  > [1] and C#  does for its "namespace" construct [2].
>  >
>  >  --
>  >  [1]
>  > http://java.sun.com/docs/books/jls/third_edition/html/packages.html
>  >  [2] http://www.jaggersoft.com/csharp_standard/8.12.htm
>  >
>  > --
>  > Sebastian Bergmann
>  > http://sebastian-bergmann.de/
>  > GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867
>  > C514 B85B 5D69
>  >
>  > --
>  > PHP Internals - PHP Runtime Development Mailing List
>  > To unsubscribe, visit: http://www.php.net/unsub.php


-- 
Larry Garfield			AIM: LOLG42
larry@[...].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

-- 
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