Re: Prefer Signed or Unsigned in D?

2015-09-03 Thread John Carter via Digitalmars-d-learn
On Wednesday, 2 September 2015 at 21:43:17 UTC, ponce wrote: Additionally, I was said weeks ago on this NG that and signed overflow in D is not actually Undefined Behaviour. Interesting.. The reference is fairly terse on exactly what happens, is it more formally specified anywhere? In which

Re: Prefer Signed or Unsigned in D?

2015-09-02 Thread John Carter via Digitalmars-d-learn
On Wednesday, 2 September 2015 at 11:03:00 UTC, ponce wrote: On Tuesday, 1 September 2015 at 23:06:50 UTC, John Carter wrote: C/C++ discussion here http://blog.robertelder.org/signed-or-unsigned-part-2/ D rules here... http://dlang.org/type.html#integer-promotions Everything

Re: Prefer Signed or Unsigned in D?

2015-09-02 Thread ponce via Digitalmars-d-learn
On Wednesday, 2 September 2015 at 21:22:59 UTC, John Carter wrote: On Wednesday, 2 September 2015 at 11:03:00 UTC, ponce wrote: Everything Bjarne said still applies equally to D code, since integer promotion is identical with C from what I understand. Hmm. What Robert Elder says also

Re: Prefer Signed or Unsigned in D?

2015-09-02 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Wednesday, 2 September 2015 at 09:47:16 UTC, BBasile wrote: On Tuesday, 1 September 2015 at 23:06:50 UTC, John Carter wrote: C/C++ discussion here http://blog.robertelder.org/signed-or-unsigned-part-2/ D rules here... http://dlang.org/type.html#integer-promotions It depends on

Re: Prefer Signed or Unsigned in D?

2015-09-02 Thread BBasile via Digitalmars-d-learn
On Tuesday, 1 September 2015 at 23:06:50 UTC, John Carter wrote: C/C++ discussion here http://blog.robertelder.org/signed-or-unsigned-part-2/ D rules here... http://dlang.org/type.html#integer-promotions It depends on the context. You should take care of blending signed and

Re: Prefer Signed or Unsigned in D?

2015-09-02 Thread ponce via Digitalmars-d-learn
On Tuesday, 1 September 2015 at 23:06:50 UTC, John Carter wrote: C/C++ discussion here http://blog.robertelder.org/signed-or-unsigned-part-2/ D rules here... http://dlang.org/type.html#integer-promotions Everything Bjarne said still applies equally to D code, since integer

Prefer Signed or Unsigned in D?

2015-09-01 Thread John Carter via Digitalmars-d-learn
C/C++ discussion here http://blog.robertelder.org/signed-or-unsigned-part-2/ D rules here... http://dlang.org/type.html#integer-promotions