Template instantiation syntax

Bill Baxter wbaxter at gmail.com
Sat Oct 11 02:08:54 PDT 2008


On Sat, Oct 11, 2008 at 3:29 PM, Walter Bright
<newshound1 at digitalmars.com> wrote:
> Max Samukha wrote:
>>
>> I hope this insignificant issue is not taking too much of your and
>> Andrei's time.
>
> Implementing it isn't a problem. The volume of messages about it consumes
> the bulk of the time <g>.
>
> I don't agree that it is insignificant. A lot of programmers are put off by
> C++ templates, myself included. The question is, why? They shouldn't
> conceptually be that complicated. I think syntax is a big part of it. I just
> can never seem to get a mental grip on the C++ template syntax. Like
> makefiles, I write C++ templates by copy/paste/modify related ones. This is
> just wrong. If the syntax can be made more intuitive and appealing, I
> believe it will break down the barriers to using templates naturally.
>
> I've seen this happen for other things. Syntax matters.

But it's not the << and >> that make C++ templates hard to understand.
 Replacing that with some other character or character sequence would
make very little difference in how difficult they are to understand.
It's more the lack of a straighforward equivalent for things like
static if.
Changing details like the character used for this or that can make the
code more or less readable though.  But that doesn't really affect how
difficult it is to remember how to write something.

--bb



More information about the Digitalmars-d mailing list