An inconvenient truth
Max Samukha
samukha at voliacable.com.removethis
Wed Oct 8 07:52:26 PDT 2008
On Wed, 08 Oct 2008 10:06:29 -0400, superdan <super at dan.org> wrote:
>Max Samukha Wrote:
>> I'm glad curls didn't get there. If I saw them in the beginning, my
>> first reaction would probably have been: "Why block delimiters for
>> template parameters? It's even odder than !(".
>
>how the heck. since like forever there's been three kinds of parens () [] and {}. they pair n all. choosing one for template args is anyone's first guess. but !( i bet you couldn't see comin' if it bit yer nose.
You are right about parens, though I don't completely understand the
"but !( i bet you couldn't see comin' if it bit yer nose." part.
>
>> After staring for some time at templated code written by you and other
>> people, I feel like joining !( supporters. It doesn't shout at me any
>> louder than != or unary !. There needs to be a space after ! for it to
>> shout properly. Nesting is rare and alleviated by aliases.
>
>really!(how'd ya figure?)
from the looks of std.traits/algorithm/functional/etc. and my
templated code. maybe it's not indicative at all.
> besides i often write code like
>
>sort!
> ((string a, string b) { ... })
> (array);
>
>pisses me off.
I usually stick ( to !. Something like:
sort!((string a, string b) {
...
})
(array);
or use a nested function instead of function literal.
More information about the Digitalmars-d
mailing list