Should the comma operator be removed in D2?
retard
re at tard.com.invalid
Thu Nov 19 00:33:55 PST 2009
Wed, 18 Nov 2009 18:38:25 -0500, Robert Jacques wrote:
> On Wed, 18 Nov 2009 15:01:10 -0500, Stewart Gordon <smjg_1998 at yahoo.com>
> wrote:
>
>> Robert Jacques wrote:
>> <snip>
>>> However, I imagine tuple(a++,b++) would have some overhead, which is
>>> exactly what someone is trying to avoid by using custom for loops.
>> <snip>
>>
>> Even if tuples do have an overhead, it would be a naive compiler that
>> generates it in cases where nothing is done with it.
>>
>> Stewart.
>
> Actually, as the current compiler knows nothing about tuples, I'd have
> to call it very naive with respect to tuple optimization. :)
It does. Try
$ strings dmd
on *nix or compiling the following code:
template Tuple(T...) { alias T Tuple; }
int a, b;
Tuple!(a, b) = Tuple!(1,2);
More information about the Digitalmars-d
mailing list