On Sun, July 8, 2007 2:58 am, 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() {
> }
> ?>
+1 for braces.
<?php
function super_common_function_every_namespace_in_my_project_uses(){
}
namespace A::B {
function foo() {
//arcana of A::B stuff
}
}
?>
This, to me, is not an unreasonable code layout, other than the
ridiculous function name.
If you want to document "namespaces will never be nested" from the
get-go, that would be fine, of course.
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php