feature req: extend property syntax func calls to classes, interfaces, primitives? also, final interface methods w. code
Henning Hasemann
hhasemann at web.de
Mon May 21 23:38:40 PDT 2007
On Mon, 21 May 2007 22:54:43 -0700
"David B. Held" <dheld at codelogicconsulting.com> wrote:
> Downs wrote:
> > [...]
> > 1) to extend the property syntax to classes and interfaces, _maybe_ even
> > arrays and primitive types.
> > Such a change would allow one to write "interface barf { } void
> > test(barf b) { do stuff; } myBarf.test; "
>
> This is related to a proposal to allow both member and free function
> call syntax. That is:
>
> a.foo();
>
> could also be called as:
>
> foo(a);
Maybe the Dylan language (http://www.opendylan.org) would be of interest here,
where actually no such thing such class methods exists
but only global multi-dispatched methods with the syntactic
sugar described above.
Of cause that are totally different semantics but maybe one or an other
thing of dylan design/implementation is interesting for D.
Henning
--
GPG Public Key: http://keyserver.veridis.com:11371/search?q=0x41911851
Fingerprint: 344F 4072 F038 BB9E B35D E6AB DDD6 D36D 4191 1851
More information about the Digitalmars-d
mailing list