If I had my way

F i L witte2008 at gmail.com
Tue Dec 13 16:14:07 PST 2011


Michel Fortin wrote:
> Or should we invent a syntax such as array.(other.module.front)?

I think the syntax should be:
array.(~[{*&=>other.module.front}])();


no, in all honesty is there a reason the syntax you came up with 
wouldn't work?

    module foo;

    struct Foo {
        void bar() { ... }
    }

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    import foo;
    import a, b; // both define Foo.bar()

    void main() {
        auto foo = Foo();
        foo.bar();     // internal member
        foo.(a.foo)(); // module a
    }




More information about the Digitalmars-d mailing list