shouting versus dotting

Bill Baxter wbaxter at gmail.com
Mon Oct 6 05:38:02 PDT 2008


On Sun, Oct 5, 2008 at 1:06 PM, Andrei Alexandrescu
<SeeWebsiteForEmail at erdani.org> wrote:
> The problem I see with "!" as a template instantiation is not technical. I
> write a fair amount of templated code and over years the "!" did not grow on
> me at all. I was time and again consoled by Walter than one day that will
> happen, but it never did. I also realized that Walter didn't see a problem
> with it because he writes only little template code.

I'm joining this discussion late, but I just wanted to say the !()
doesn't bother me so much.
What Walter said to you was pretty much how it went for me.  Seemed
weird for a while, but I got used to it.

I had to do several double-takes reading this thread thinking people
were suggesting to use plain "()" because the little dot is just so
easy to miss.

I find !() to at least be easier on the eyes than greater-than
less-than everywhere in C++.

I wouldn't be adamantly opposed to a different syntax, but it would
have to be better by leaps and bounds for me to think it was worth the
headache.  And .() doesn't seem leaps and bounds better to me.

I suggest, though, that if you think it looks a lot better you should
at least post some example code showing "before" and "after" to try to
convince us.  Seems like not many here see a lot of point in making
the change, so rather than pleading with everyone to try it out on
their own, why not just save us the effort and show us how it improves
the code you're looking at?

--bb



More information about the Digitalmars-d mailing list