Library Typedefs are fundamentally broken

H. S. Teoh via Digitalmars-d digitalmars-d at puremagic.com
Tue Sep 16 22:38:30 PDT 2014


On Wed, Sep 17, 2014 at 03:05:57AM +0000, Adam D. Ruppe via Digitalmars-d wrote:
> I don't think I've used any kind of typedef for a long time. I prefer
> to just use a plain struct.

Yeah, I found structs + alias this far more useful than any kind of
typedef. Due to the way alias this lookups work, you can basically
"customize" the underlying type by defining the appropriate struct
methods to shadow the underlying type's, thereby achieving a kind of
"static inheritance".


T

-- 
Error: Keyboard not attached. Press F1 to continue. -- Yoon Ha Lee, CONLANG


More information about the Digitalmars-d mailing list