On Mon, July 23, 2007 9:52 am, Brian Moon wrote: > David Zülke wrote: >> Oh yes, sure, that must be the main point about namespaces - I can >> use >> "::" instead of "_" as a delimiter! Yay! > > If all you are going to do is: > > <?php > > include "MyClass.php"; > import MyClass; > > ?> > > Then why use a namespace? I really don't see the point. Namespaces > are > doing nothing for you in this case.
But that's exactly what I want to do most of the time. I don't want to dink around with namespaces at all, until both LibA and LibB use 'Date' and then I *have* to do something. And at that point, I want to do the minimum I need to do. import LibA; import LibB::Date as BDate; Or, in my dream world of PHP being unique: import LibB (-Date); import LibB::Date as BDate; That would smush all of LibA and LibB (except LibB::Date) into my global space, and give me LibB as BDate; And, yes, purists are screaming at me now. And, no, I don't really care :-) I think Stas' implementation works super well for monster projects trying to have total separation. I don't think it works well at all for the unwashed masses that just want to get the job done with minimum fuss -- which is what PHP was originally all about :-) [shrug] That said, I don't see a lot of other serious options on the table -- My examples above hardly constitute a formal proposal, and nobody else who dislikes Stas' implementation is putting in the effort to do more than just complain about it. If there's another proposal to make, or even better, an implementation, have at it. -- 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