Library Typedefs are fundamentally broken

ketmar via Digitalmars-d digitalmars-d at puremagic.com
Sun Sep 21 13:41:11 PDT 2014


On Sun, 21 Sep 2014 11:09:28 -0700
Andrei Alexandrescu via Digitalmars-d <digitalmars-d at puremagic.com>
wrote:

> >> alias Int1 = Typedef!(int, "a.Int1");
> >> alias Int2 = Typedef!(int, "b.Int2");
> > ah, now that's cool. module system? wut? screw it, we have
> > time-proven manual prefixing!
> Use __MODULE__. -- Andrei
you still can't grok concept of "ugly == unusable". thank you, i'd
better fsck this miserably attempt on type security, and many other
practical programmers too. we trying to explain you this and each time
you answers "so what? no, it's not." even to people who tried to use
this disgusting "solution" and found it unacceptable and broken.

alias Int1 = Typedef!(int, __MODULE__~".Int1");

don't make me laugh. this is not just ugly, this is MEGAUGLY. then we
can make some kind of magic template to hide this uglyness, yes. the
uglyness which shouldn't be there in the first place. each time when
such ugly "workaround" proposed we can see the feature as completely
broken.

people trying to tell you that it is broken for single developer (too
much to type for nothing). that it is broken for group developement
(people will forget to mix all the uglyness for necessary result). that
it is just broken.

please, we aren't bunch of kids who just happen to dislike typing extra
chars. our objections backed by trying to use the feature in practice.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20140921/7a80e66a/attachment.sig>


More information about the Digitalmars-d mailing list