Hi,

Thanks for that.

But actually I don't see: Why is "use" not enough? As far as I can see your
example, why it would introduce a BC, doesn't really match to original
question, why "use function" is used. Especially I don't see any ambiguity:

foo(); // Always a function. You cannot call classes this way
new foo(); // always a class
foo::bar(); // Always a class

But the example I mentioned before

namespace {
    function bar() {}}
 namespace foo {
    function bar() {}}
 namespace {
    use foo\bar;
    bar();}

points to a different problem, which I didn't see solved by adding the
"function"-keyword to "use". Can you clarify this? Because I'd try to avoid
new syntax wherever possible.

Regards,
Sebastian


2013/7/23 Igor Wiedler <i...@wiedler.ch>

> Hi,
>
> Based on Sebastian's feedback I have updated the RFC and the patch to
> include a `use const` sequence that works just like `use function`, but for
> namespaced constants.
>
> Example usage:
>
>     namespace foo\bar {
>         const baz = 42;
>     }
>
>     namespace {
>         use const foo\bar\baz;
>         var_dump(baz);
>     }
>
> I also fixed some other issues that the original patch had in the process
> (see commit history). Please keep the feedback coming.
>
> Thanks,
>
> Igor
>
>


-- 
github.com/KingCrunch

Reply via email to