Revised RFC on range design for D2
Bill Baxter
wbaxter at gmail.com
Sun Sep 28 21:10:16 PDT 2008
On Mon, Sep 29, 2008 at 12:53 PM, Andrei Alexandrescu
<SeeWebsiteForEmail at erdani.org> wrote:
> Bill Baxter wrote:
>>
>> Basically there's no convenient way to take the address of one of a
>> getter/setter function pair, currently. I think that should factor in
>> the solution here.
>
> Overloading is the issue, and that's quite a different story.
It's a different, but intertwined story.
> If you know
> the exact type, you can take the address of something.
>
> struct S
> {
> int foo() {}
> void foo(int) {}
> }
>
> void main()
> {
> S s;
> void delegate(int) x = &s.foo;
> int delegate() y = &s.foo;
> }
Having to write out "delegate(argumenttype) doesn't qualify as
"convenient" in my book.
--bb
More information about the Digitalmars-d-announce
mailing list