Steven Schveighoffer:
This feature brings absolutely nothing to the table IMO.
Added as issue 5368.
Bye,
bearophile
On Thu, 23 Dec 2010 00:34:41 -0600
Christopher Nicholson-Sauls ibisbase...@gmail.com wrote:
On 12/22/10 15:06, Andrej Mitrovic wrote:
Oooh. That cought me off guard, sorry.
Thanks Steve.
I'll concede that the syntax can be odd at first, but it also enables
some interesting things.
spir:
While I understand some may consider this a nice feature, for me this is an
enormous bug. A great way toward code obfuscation. I like D among other
reasons because it's rather clear compared to other languages of the family.
The main problem here is that I have never felt the need of
On 12/23/10, bearophile bearophileh...@lycos.com wrote:
spir:
While I understand some may consider this a nice feature, for me this is
an enormous bug. A great way toward code obfuscation. I like D among other
reasons because it's rather clear compared to other languages of the
family.
The
bearophile wrote:
spir:
While I understand some may consider this a nice feature, for me this is an
enormous bug. A great way toward code obfuscation. I like D among other reasons
because it's rather clear compared to other languages of the family.
The main problem here is that I have
On Thu, 23 Dec 2010 12:34:45 -0500, Don nos...@nospam.com wrote:
bearophile wrote:
spir:
While I understand some may consider this a nice feature, for me this
is an enormous bug. A great way toward code obfuscation. I like D
among other reasons because it's rather clear compared to other
DMD 2.051 with -unittest:
import std.algorithm, std.range, std.stdio : writeln;
void main() {}
void average(double[]) { writeln(non-variadic); }
void average(double[]...) { writeln(variadic); }
unittest {
average(1.5); // writes variadic
}
On Wednesday, December 22, 2010 12:05:18 Andrej Mitrovic wrote:
DMD 2.051 with -unittest:
import std.algorithm, std.range, std.stdio : writeln;
void main() {}
void average(double[]) { writeln(non-variadic); }
void average(double[]...) { writeln(variadic); }
unittest {
I thought the variadic version would only take this type:
average([1.5], [2.5]);
So a variable number of *array* of doubles, not a variable number of doubles.
On 12/22/10, Jonathan M Davis jmdavisp...@gmx.com wrote:
On Wednesday, December 22, 2010 12:05:18 Andrej Mitrovic wrote:
DMD 2.051
On Wed, 22 Dec 2010 15:46:01 -0500, Andrej Mitrovic
andrej.mitrov...@gmail.com wrote:
I thought the variadic version would only take this type:
average([1.5], [2.5]);
So a variable number of *array* of doubles, not a variable number of
doubles.
No, that's not it.
T[] arg... is a
Oooh. That cought me off guard, sorry.
Thanks Steve.
On 12/22/10, Steven Schveighoffer schvei...@yahoo.com wrote:
On Wed, 22 Dec 2010 15:46:01 -0500, Andrej Mitrovic
andrej.mitrov...@gmail.com wrote:
I thought the variadic version would only take this type:
average([1.5], [2.5]);
So a
On 12/22/10 15:06, Andrej Mitrovic wrote:
Oooh. That cought me off guard, sorry.
Thanks Steve.
I'll concede that the syntax can be odd at first, but it also enables
some interesting things. For example, this works:
class Foo {
this (int i, double f) { /*...*/ }
/*...*/
}
void
12 matches
Mail list logo