1 - The official namespace support will not use curly braces? Never or
can be in the future?

Nobody knows what will be is the future. As of now, the autors do not see a compelling reason to support more than once namespace per file.

I suggest to get things standard-ized. If a class uses braces,
functions uses braces, why not use braces for namespaces...?

The same reason why file don't use braces, filenames don't have braces, directories don't have braces, etc. Namespaces are different. Not everything should look exactly alike - we are not LISP.

I'll give you an example... PHP Doctrine package has a lot of files,
hundreds... there is a way to compile it in a single file, to save
some memory usage for including these files. Including a single file

Putting all code together in the same file rarely saves any significant amount of memory and leads to a very messy code. Of course, it's your application and your decision, but I don't see any reason to promote such style on the language level. Anyway, if you can do with everything in single file, I think having single namespace won't hurt.

2 - Overwrite will be implemented?
Something like: overwrite function strlen( ... ) { ... }

What it's supposed to do?

<?php
class Bar { ... }

<?php
namespace Foo {
 class Bar { ... }
}

<?php
import Foo;

For 100th time, import Foo is a no-op. I'm thinking about prohibiting it at all... If you do import Foo::bar you'll get an error if Bar is already defined.

4 - Will namespaces support anything else than functions and classes
(like constants, for example)?

Not likely, since there's no such thing as free-form constant. Though, in fact, we might add one (i.e. const X = 'foo' which is define('X', 'foo')) ... But, if you need a constant, why not put it into a class?
--
Stanislav Malyshev, Zend Software Architect
[EMAIL PROTECTED]   http://www.zend.com/
(408)253-8829   MSN: [EMAIL PROTECTED]

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

Reply via email to