need clarification: will typedef, C struct initialization, etc.

Lionello Lunesu lio at lunesu.remove.com
Fri Jun 4 04:38:22 PDT 2010


On 4-6-2010 1:17, Adam Ruppe wrote:
>....
> This strikes me as being a supremely elegant solution, not a hack.

struct Typedef( T, T init = T.init, Type type = Type.Sub, string _f =
__FILE__, int _l = __LINE__ ) { ...

Yes, that's a hack.

And it's great that we can do sub, super, independent and parallel, but
the question is: are they needed?

I thought I had found a compelling use case for typedef. Perhaps,
instead of throwing it out because it was ill defined, we should define
what's it supposed to solve and then make sure that's exactly what it
does, and nothing more.

L.


More information about the Digitalmars-d mailing list