Hello all,

Sorry to post here being an "outsider".
I didn't post because I know nothing about the internals, really.
However after some incomplete thought I have a not very thorough
suggestion about the ambiguity issue mentioned in the RFC wiki.
I would like to ask if this is possible.

Let me quote the challenge here:

<quote>
// is this class one::step or namespace one::step?
one::step::two();
</quote>

Is is possible that the engine first looks for
classes, then namespaces? So
"one::step::two();" should always result in:

Namespace: one
Class: step
Static Method: two

Now the "ambiguity" is resolved.
If we want to really mean namespace "one::step" and function two(),
one must explicitly write the following:

(one::step)::two();

Yes, parenthesis, just like when we want to write (1 + 2) * 3.

So my question is: can parenthesis play a part in namespace resolving?

There can be problem, e.g. I don't know if the engine can distinguish it
from typecasting without many efforts. But anyway I hope this doesn't
sound too stupid :).

T


>Hi,
>
>http://wiki.php.net/rfc/namespaceissues
>
>Read it and discuss.  Let's be clear people: the technical problems in
>namespaces are limited and solvable.  The problems in the political
>environment surrounding them may not be.  Wouldn't politics be a
>stupid-ass reason to remove namespaces?
>
>Greg

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to