Hi,
On Sep 8, 2008, at 8:45 PM, Lukas Kahwe Smith wrote:
On 08.09.2008, at 19:53, Dmitry Stogov wrote:
The main PHP namespaces ideas come from Java packages and Java
classes
have to write these "use" statements in the same way. It's not the
end
of the world. I believe that well-designed frameworks won't require a
lot of use statements in user-space code.
Given the overwhelming feedback that this is indeed a big issue, I
would be more careful with saying this is a non issue for "well
designed" frameworks. If someone could post some links to their
namespace using code that is suffering from the current situation it
would provide a good opportunity for all of us to review and comment
(hopefully in a respectful manner .. after all these people are
treading on new territory so its much easier to make witty comments
than doing the initial hard work of trying to do something new).
Especially in this sense I would recommend all people on this list
to make sure they use language that encourages people from coming
out of the shadows on this topic, rather than scaring them off.
I don't see this as a big issue either. I've seen and worked with very
large Java code bases and it has never been an issue. Sure, there are
classes where you can end up with up to 40 or more imports. In Java,
IDEs and code-folding make this a non-issue. And it needs to be noted
that wildcard imports in Java are not used often. Direct imports of
the classes is often preferred, especially due to the fact that it's
made *very* easy by IDEs/editors. Even without the help of editors/
IDEs in PHP I would still consider this a small issue. And dozens of
imports/uses are not the common case anyway (it *may* even indicate
design issues/too much coupling).
Just my 2 cents on this topic.
Roman
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php