Library Typedefs are fundamentally broken

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Sun Sep 21 15:17:52 PDT 2014


On 9/21/14, 1:41 PM, ketmar via Digitalmars-d wrote:
> 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".

Also I must be missing the distinction between "workable solution" and 
"usable solution". Such semantic subtleties seem to be lost on me in 
this context.

> 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.

The problem here is inept argumentation. I'm all for a well argued 
debate. This argument seems to have trouble getting legs, and foaming at 
the mouth is unlikely to add value to it.

> alias Int1 = Typedef!(int, __MODULE__~".Int1");
>
> don't make me laugh. this is not just ugly, this is MEGAUGLY.

Pretty much by what I mean with "foaming at the mouth" and "vivid 
anecdote fallacy". Can you make an argument with words in the dictionary?

> 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.

I'm not buying this. The more it goes the less convincing it goes.


Andrei



More information about the Digitalmars-d mailing list