I don't favor "." any more than the next guy, but I am glad there is
awareness of how unfit a choice "!" is. If you have any ideas, please
post them! Ah! I! Exclaimed! Again!

this lot:
Positive!(real)(joke);
Positive.(real)(joke);
Positive#(real)(joke);
Positive (real)(joke);
Positive&(real)(joke);
Positive`(real)(joke);
Positive´(real)(joke);
Positive^(real)(joke);
Positive¨(real)(joke);
Positive\(real)(joke);
Anything else I forgot?
Or we could use special delimiter characters:
Positive<real>(joke);
Positive“real”(joke);
Positive«real»(joke);
Positive#real (joke);
Each having its own problem though.
My preference still goes to "!(".

There was also Positive{real}(joke), with which I couldn't find an
ambiguity.

- - -
The ".(" syntax makes me think more of something like this:
void func(T, alias methodOfT, A...)(T obj, A args)
{
obj.(methodOfT)(args);
}
which I which I could do. If methodOfT was a string, I suppose I could
use string mixins, but it pushes diagnostics about misnamed methods
further in the template and requires adding quotes to the template
parameter when instanciating.

Given that methodOfT is an alias, there is no need for the parens.
Andrei

It just occured to me ..
if we're rethinking template syntax anyway, we could redefine the comma
operator in 2.0 to create tuples.
Then the "of" keyword could be used for templates:
"(Vector of 2, int)[] veclist; "
I don't think it gets more understandable than that :D
--downs

It just occured to me ..
if we're rethinking template syntax anyway, we could redefine the comma
operator in 2.0 to create tuples.
Then the "of" keyword could be used for templates:
"(Vector of 2, int)[] veclist; "
I don't think it gets more understandable than that :D

Now we are talking!
PS: Nice way to finally introduce tuple syntax to the language ;)
--
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
----------------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------------
I can't watch TV for four minutes without thinking
I have five serious diseases.
Like: "Do you ever wake up tired in the mornings?"
Oh my god I have this, write this down. Whatever it is, I have this.

It just occured to me ..
if we're rethinking template syntax anyway, we could redefine the comma
operator in 2.0 to create tuples.
Then the "of" keyword could be used for templates:
"(Vector of 2, int)[] veclist; "
I don't think it gets more understandable than that :D

+1!!! Pure genius! Hey, looks like something I saw in Python... oh
well, Python is a good language, why not try and learn a few things from it?

Personally I don't think that we should just change the symbol ! to .
because it will break a load of libraries for purely an ascetic change.
Its difficult to argue that . is better then ! as it depends on the
person reading the code. However if a template change allows for more
functionality then it might be worth considering.
Anyway extending a previous suggestion. What about using ;?
Foo(int T, alias X; T val, X val2);
One clash I can think of is that it might get mixup with a for loop,
however I imagine that's easily detectable. Also its slightly harder to
make a distinction between the template args and the value however on
the positive side its less typing.
-Joel

Personally I don't think that we should just change the symbol ! to .
because it will break a load of libraries for purely an ascetic change.
Its difficult to argue that . is better then ! as it depends on the
person reading the code. However if a template change allows for more
functionality then it might be worth considering.
Anyway extending a previous suggestion. What about using ;?
Foo(int T, alias X; T val, X val2);
One clash I can think of is that it might get mixup with a for loop,
however I imagine that's easily detectable. Also its slightly harder to
make a distinction between the template args and the value however on
the positive side its less typing.
-Joel

This is the first suggestion which really interests me. It's really
short, and there is some precedent for the use of ; as a separator from
for/foreach.
But what do you do for non-function templates, which is really the
problem case? I think you end up with a bunch of ;);), which maybe looks
a bit odd.
auto v = new Vector!(Stack!(Tuple!(Positive!(real), Matrix!(real))))(3, 3));
becomes:
auto v = new Vector(Stack(Tuple(Positive(real), Matrix(real;););); 3, 3);

Personally I don't think that we should just change the symbol ! to .
because it will break a load of libraries for purely an ascetic
change. Its difficult to argue that . is better then ! as it depends
on the person reading the code. However if a template change allows
for more functionality then it might be worth considering.
Anyway extending a previous suggestion. What about using ;?
Foo(int T, alias X; T val, X val2);
One clash I can think of is that it might get mixup with a for loop,
however I imagine that's easily detectable. Also its slightly harder
to make a distinction between the template args and the value however
on the positive side its less typing.
-Joel

This is the first suggestion which really interests me. It's really
short, and there is some precedent for the use of ; as a separator from
for/foreach.
But what do you do for non-function templates, which is really the
problem case? I think you end up with a bunch of ;);), which maybe looks
a bit odd.
auto v = new Vector!(Stack!(Tuple!(Positive!(real), Matrix!(real))))(3,
3));
becomes:
auto v = new Vector(Stack(Tuple(Positive(real), Matrix(real;););); 3, 3);

Personally I don't think that we should just change the symbol ! to .
because it will break a load of libraries for purely an ascetic
change. Its difficult to argue that . is better then ! as it depends
on the person reading the code. However if a template change allows
for more functionality then it might be worth considering.
Anyway extending a previous suggestion. What about using ;?
Foo(int T, alias X; T val, X val2);
One clash I can think of is that it might get mixup with a for loop,
however I imagine that's easily detectable. Also its slightly harder
to make a distinction between the template args and the value however
on the positive side its less typing.
-Joel

This is the first suggestion which really interests me. It's really
short, and there is some precedent for the use of ; as a separator
from for/foreach.
But what do you do for non-function templates, which is really the
problem case? I think you end up with a bunch of ;);), which maybe
looks a bit odd.
auto v = new Vector!(Stack!(Tuple!(Positive!(real),
Matrix!(real))))(3, 3));
becomes:
auto v = new Vector(Stack(Tuple(Positive(real), Matrix(real;););); 3, 3);

That's a good point. I think the ; should be optional for cases when
there's no parameters (would that still work?).
auto v = new Vector(Stack(Tuple(Positive(real), Matrix(real))); 3, 3);
Also I think that any nested template syntax will be hard to read,
that's why I prefer to use typedef/alias.