[...snip...]
In other words, 1 line of code is needed to take advantage of
namespace's full protection and ability to import conflicting class
names into the "global" (in this case unqualified, not
containing :: in
the name) scope, while at the same time preserving BC with
existing code
(no modification needed beyond addition of "namespace php;").I recommend that the manual specify this convention, and will happily
take on the documentation of it.
I've only been skimming the namespace argument, so forgive me if this is totally non-sensible, but if such usage is fully BC, and has only upsides with no downside, would there be any mileage in making it implicit rather than explicit -- i.e., any code not explicitly namespaced is automatically in the reserved namespace php? Such usage could be completely invisible to your everyday PHP user, and only need explaining in an intro to namespaces section.
Cheers!
Mike
Mike Ford, Electronic Information Services Adviser,
JG125, The Headingley Library
James Graham Building, Headingley Campus
Tel: extn 24730 Fax: extn 23211
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm