On Sunday, 20 November 2016 at 11:46:04 UTC, Marc Schütz wrote:
Try placing it outside the function. Method call syntax doesn't
work with nested functions, see here:
https://dlang.org/spec/function.html#pseudo-member
"The reason why local symbols are not considered by UFCS, is to
avoid unexp
On Sunday, 20 November 2016 at 12:08:23 UTC, Ilya Yaroshenko
wrote:
You can use builtin complex numbers (cfloat/cdouble/creal). The
idea of std.complex is wrong . Mir GLAS uses builtin complex
numbers and I don't think they will be really deprecated. --Ilya
Good to know! The builtin syntax i
On Saturday, 19 November 2016 at 19:42:27 UTC, Marduk wrote:
On Saturday, 19 November 2016 at 16:17:08 UTC, Meta wrote:
On Saturday, 19 November 2016 at 09:38:38 UTC, Marduk wrote:
[...]
D used to support complex numbers in the language (actually it
still does, they're just deprecated). This
On Saturday, 19 November 2016 at 20:24:09 UTC, Marduk wrote:
On Saturday, 19 November 2016 at 12:55:57 UTC, Marc Schütz
wrote:
On Saturday, 19 November 2016 at 11:11:36 UTC, Nordlöw wrote:
On Saturday, 19 November 2016 at 09:38:38 UTC, Marduk wrote:
The difference is that D is more verbose. Am
On Saturday, 19 November 2016 at 20:08:42 UTC, Marduk wrote:
On Saturday, 19 November 2016 at 11:11:36 UTC, Nordlöw wrote:
On Saturday, 19 November 2016 at 09:38:38 UTC, Marduk wrote:
The difference is that D is more verbose. Am I missing
something? Can we have C's behaviour in D?
Something l
On Saturday, 19 November 2016 at 12:55:57 UTC, Marc Schütz wrote:
On Saturday, 19 November 2016 at 11:11:36 UTC, Nordlöw wrote:
On Saturday, 19 November 2016 at 09:38:38 UTC, Marduk wrote:
The difference is that D is more verbose. Am I missing
something? Can we have C's behaviour in D?
Someth
On Saturday, 19 November 2016 at 11:11:36 UTC, Nordlöw wrote:
On Saturday, 19 November 2016 at 09:38:38 UTC, Marduk wrote:
The difference is that D is more verbose. Am I missing
something? Can we have C's behaviour in D?
Something like
auto I(T)(T im)
if (isNumeric!T)
{
return complex
On Saturday, 19 November 2016 at 16:17:08 UTC, Meta wrote:
On Saturday, 19 November 2016 at 09:38:38 UTC, Marduk wrote:
Dear all,
I just discovered D and I am translating some numerical code I
wrote in C. I was surprised to learn that there are at least
two things that are easier in C than in
On Saturday, 19 November 2016 at 09:38:38 UTC, Marduk wrote:
Dear all,
I just discovered D and I am translating some numerical code I
wrote in C. I was surprised to learn that there are at least
two things that are easier in C than in D:
+ Writing complex numbers
C: complex double z = 2.0 +
On Saturday, 19 November 2016 at 11:11:36 UTC, Nordlöw wrote:
On Saturday, 19 November 2016 at 09:38:38 UTC, Marduk wrote:
The difference is that D is more verbose. Am I missing
something? Can we have C's behaviour in D?
Something like
auto I(T)(T im)
if (isNumeric!T)
{
return complex
On Saturday, 19 November 2016 at 09:38:38 UTC, Marduk wrote:
The difference is that D is more verbose. Am I missing
something? Can we have C's behaviour in D?
Something like
auto I(T)(T im)
if (isNumeric!T)
{
return complex(0, im);
}
unittest
{
auto x = 1 + 2.I;
}
11 matches
Mail list logo