Deprecate static opCall for structs?
BCS
none at anon.com
Mon Nov 23 15:06:52 PST 2009
Hello grauzone,
> 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
>>
Not going to happen, at run time, struct constructors superset struct literals.
It should be possible to make them do the same at compile time.
More information about the Digitalmars-d
mailing list