On Monday, 7 December 2015 at 11:49:51 UTC, Dominikus Dittes
Scherkl wrote:
On Sunday, 6 December 2015 at 15:01:08 UTC, cym13 wrote:
Don't use opCmp, all binary operators should be overriden
using opBinary. For more information I recommend this page
On Monday, 7 December 2015 at 13:31:52 UTC, Mike Parker wrote:
On Monday, 7 December 2015 at 11:49:51 UTC, Dominikus Dittes
Scherkl wrote:
On the other hand the chapter also states that opCmp() should
always return "int" - which is a bad idea if you e.g. want to
provide a "NaN" value in your
On Sunday, 6 December 2015 at 15:01:08 UTC, cym13 wrote:
Don't use opCmp, all binary operators should be overriden using
opBinary. For more information I recommend this page
http://ddili.org/ders/d.en/operator_overloading.html
Why should we don't use opCmp() ?
I can't see any recommendation
On Monday, 7 December 2015 at 00:43:50 UTC, Ali Çehreli wrote:
On 12/06/2015 06:41 AM, Márcio Martins wrote:
> auto m = (a > b) * a + 15;
> auto c = a.choose(a > b)^^2;
What do those operations do? Are you thinking of a special
meaning for '>', perhaps common in numerical computations,
which
On Monday, 7 December 2015 at 17:18:20 UTC, Dominikus Dittes
Scherkl wrote:
Hmm. But it works just fine! It overloads also the special
floatingpoint operators <> !<> !<= and so on.
Those are deprecated:
http://dlang.org/deprecate.html#Floating%20point%20NCEG%20operators
And how else could I
I am writing a generic numerical array struct, and I can't find a
way to do element-wise comparison operators.
What I had envisioned was something like the following, assuming
a, b, c and m are array-like, and all operations return arrays.
auto m = (a > b) * a + 15;
auto c = a.choose(a >
On Sunday, 6 December 2015 at 14:41:01 UTC, Márcio Martins wrote:
I am writing a generic numerical array struct, and I can't find
a way to do element-wise comparison operators.
What I had envisioned was something like the following,
assuming a, b, c and m are array-like, and all operations
On 12/06/2015 06:41 AM, Márcio Martins wrote:
> auto m = (a > b) * a + 15;
> auto c = a.choose(a > b)^^2;
What do those operations do? Are you thinking of a special meaning for
'>', perhaps common in numerical computations, which I'm not familiar with?
If I understand correctly, 'a > b' in