Library Typedefs are fundamentally broken
bearophile via Digitalmars-d
digitalmars-d at puremagic.com
Sun Sep 21 07:49:12 PDT 2014
Dicebot:
> module a;
>
> alias Int1 = Typedef!(int, "MyInt");
>
> module b;
>
> alias Int2 = Typedef!(int, "MyInt");
>
> // oh I didn't know someone else used that cookie too..
Sooner or later a dirty semantics will bite your ass. It's an
important rule of language/library design.
> unless either type safety is not important
If type safety is not so important in a piece of code, you
probably are already not using a typedef/Typedef/newtype.
Bye,
bearophile
More information about the Digitalmars-d
mailing list