equivariant functions

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Oct 15 12:10:40 PDT 2008


Bill Baxter wrote:
> Hmmm, looking at this:
> 
> class Owner
> {
>   const?(A) a() const?{...}
>   const?(B) b() const?{...}
>   const?(C) c() const?{...}
>   const?(D) d() const?{...}
>   const?(E) e() const?{...}
>   const?(F) f() const?{...}
>   const?(G) g() const?{...}
>   const?(H) h() const?{...}
>   const?(I) i() const?{...}
>   const?(J) j() const?{...}
> }
> 
> makes me think if we go with that syntax, Andrei is sooner or later
> going to complain about his D code asking him too many questions.  :-)
> Eh, I guess he can edit the emacs mode to display const? as
> smiley-faces or something.  :-) :-)

At this point Walter will intervene with:

class Owner
{
    const?
    {
       A  a()  {...}
       B  b()  {...}
       C  c()  {...}
       D  d()  {...}
       E  e()  {...}
       F  f()  {...}
       G  g()  {...}
       H  h()  {...}
       I  i()  {...}
       J  j()  {...}
    }
}

which isn't half bad.


Andrei



More information about the Digitalmars-d mailing list