On 8/15/07, Stanislav Malyshev <[EMAIL PROTECTED]> wrote:

> > current implementation doesn't have braces; this (consequently) adds a
>
> Ouch, not braces again. What is it with braces that you need them so
> badly? Many languages aren't using the things ever, isn't it a proof
> that there's life outside braces? ;)
>

Well.. My guess is that If current implementation had braces all this
namespace/package
thing wouldn't be even discussed now. Everyone would agree that it's
namespace thing
even if one must put all file contents inside braces for parser to be happy.

However without braces current implementation looks like nothing else
in PHP. This gives
people a space to improvise and/or pushes to look for similarities of
syntax in other
languages and it seems that the closest match is Java with its
packages even though the functionality is different.

I don't want to start braces discussion again but may suggest consider
adding them?
Pros:
- It would end this discussion
- It would be good for FC. If there would be decided to allow more
then one namespace
  per file in the future.
- Syntax would be more consistent with existing constructs in the language
  (classes/functions/etc)


To sum up I think we have namespaces functionality with syntax similar
to Java packages.
Now the question is do we want developers to:
- use namespaces anr/or mimic packages functionality with "namespace" if they
  want to (+1 for namespace)
OR
- use "package" the way it shouldn't be to mimic simple namespaces if they don't
  like/want/need packages (+1 for package)


Regards,
Giedrius

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to