Deprecate static opCall for structs?

grauzone none at example.net
Fri Nov 20 16:08:01 PST 2009


Bill Baxter wrote:
> We now have struct constructors that do basically the same thing as a
> static opCall.
> Non-static opCall should still be ok, for implementing functors, but I
> think having static opCall is just too confusing given struct literals
> / struct constructors.
> 
> Right now
> struct S;
> S(1,2) ;
> could be 1) a static opCall, 2) a constructor call  3) a struct literal
> 
> That seems too many things sharing the same syntax to me.

I'd vote for removing struct constructors and static opcalls, and to fix 
the struct initializer syntax (so that it can produce struct literals).

> --bb



More information about the Digitalmars-d mailing list