----- Original Message ----- From: "Andi Gutmans" <[EMAIL PROTECTED]> To: "Dean Hall" <[EMAIL PROTECTED]>; "George Schlossnagle" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, October 01, 2001 03.15am Subject: Re: [PHP-DEV] Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] namespaces ambiguity
> Just a small follow up. I think it's probably not feasible to detect the > ambiguity. If that's the case, then it seems that we need another namespace-resolution operator. '::' comes to mind; I know some support it, but I think someone from the Zend staff had problems with it in the past. If that's the case, then we're stuck between a rock and a hard place: If we use ':', the ambiguity with the tertiary conditional will not be detected as a parse error, and weird behavior, which is hard to debug, will ensue. If we use '::', then we have whatever problems were discussed before -- I think they had to do with whether Foo::bar(), for instance, meant a method 'bar' in class 'Foo' or a function 'bar' in namespace 'Foo'. I think if we come up with a concrete method for what a namespace means in terms of a module repository -- or should we not use a module repository at all and explicitly require programmers to include files to get their namespace? I've still yet to see how to resolve the following ambiguity: Does "Foo::Bar::fubar();" mean to call the function "fubar()" in the "Foo::Bar" namespace? Or does it mean to call the method "fubar()" in the class "Bar" in the namespace "Foo"? I would love it if we could use ':' or '::' as the namespace-resolution operator, as those seem to be in line with what most languages that I know do (Java notwithstanding). But if we can't resolve this, perhaps we should use another one. '/' is the only operator I can think of that seems to make any sense whatsoever here and is not already used as an operator. "Foo/Bar/george()" means something very different from "Foo/Bar::george()". I suppose it may cause visual ambiguity for programmers -- but if we use a module repository where 99% of namespace uses come from this module repository, it would be a more-or-less direct mapping to the filesystem. Only the last '/' would not be literally translated as part of the path. Dean. -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]