Here we come again.... =\

> > So for you namespaces == C namespaces. Great, since PHP does not have
> > C packages, problem solved, it's not namespaces.
>
> I gave you description of namespaces which clearly states what namespace
> is, and has nothing to do with C or any specific programming language at
> all. When I asked what is the package, I got description of particular
> syntax in Java. Feel the difference?

Read the purpose of both, which restrictions/limitations both have,
how are they defined, how are they used, etc and you'll see if the
current implementation is more like 'namespace' or 'package'. It's not
related to package Java, namespace C, def, zendspace of whatever.

The following itens ARE THE MAJOR DIFFERENCES between namespaces and packages.
I already highlighted you which structural changes will change my vote
from one to another, and I'll publish it again... maybe you forget to
read it.

- Remove the restriction to one package/namespace per file
- Use curly braces to define one namespace
- Allow nested definitions namespace N1 { namespace SubN1 { ... }
namespace Sub2N1 { ... } }
- using/import is related to the namespace/package/whatever scope.
This is one of the explanations to use curly braces in namespaces (and
not in packages). You tell me 'namespace' are unique. I agree, but
3rdparty libraries using the name namespace alias will still mess the
entire application. So let's follow bjori (IRC) idea and create the
"filescope"!
If you need more information about WHY I added this item, read my
previous email.

Once you incorporate these changes (and not only curly braces as you
said on a previous email), I'll change my vote from package to
namespace.


> > > So for you namespaces == C namespaces. Great, since PHP does not have
> > > C namespaces, problem solved, it's not namespaces.
> >
> > I gave you description of namespaces which clearly states what namespace
> > is, and has nothing to do with C or any specific programming language at
> > all. When I asked what is the package, I got description of particular
> > syntax in Java. Feel the difference?
> >
>
> Yes, I feel the difference ;-) But, the description os namespaces you
> gave is not exactly what is implemented in PHP, it might come close.
> So PHP does also not have namespaces... neither has it packages, so I
> would say that it's something unique, and needs an unique name..

*dreaming* zendspace.... =)


>  http://java.sun.com/docs/books/jls/second_edition/html/packages.doc.html
>
> Thinking on 'packages' further I think that part of my objection to
> use of the term for PHP is that Java provides built-in packages
> (java.io etc etc) while PHP doesn't/will not for this release.
>
> Announcing that PHP has package support yet not bundling any actual
> packages seems a misnomer.

I do not agree. PHP always lived with a bunch of libraries (MySQL,
XML, etc) and the fact that it uses or not uses the newly added
feature is not a misnomer. Otherwise we'll move from PHP as a
structural/oo language to a frameworked language like C# or Java, that
you have to do:

$db = new PHP::Sql::PDO::Connection(); // creates PDOConnection object
...

The fact of added/rename a feature has nothing related to that
language support built-in packages/namespaces or not.
If you think you're still right with your assertion, once PHP
incorporates namespace then (following the opposite of your idea), and
not bundling built-in namespaces are misnomer too (C# supports
namespaces and has thousdands). See that what you said is irrelevant?
=)


On 8/16/07, Marc Gear <[EMAIL PROTECTED]> wrote:
> On 8/16/07, Sebastian Bergmann <[EMAIL PROTECTED]> wrote:
> >  http://java.sun.com/docs/books/jls/second_edition/html/packages.doc.html
>
> Thinking on 'packages' further I think that part of my objection to
> use of the term for PHP is that Java provides built-in packages
> (java.io etc etc) while PHP doesn't/will not for this release.
>
> Announcing that PHP has package support yet not bundling any actual
> packages seems a misnomer.
>
> --
> Marc Gear
> [EMAIL PROTECTED]
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Regards,


-- 
Guilherme Blanco - Web Developer
CBC - Certified Bindows Consultant
Cell Phone: +55 (16) 9166-6902
MSN: [EMAIL PROTECTED]
URL: http://blog.bisna.com
São Carlos - SP/Brazil

Reply via email to