On Saturday, 29 April 2017 at 11:48:46 UTC, Ola Fosheim Grøstad
On Saturday, 29 April 2017 at 11:24:36 UTC, Patrick Schluter
C99 says "if an int can represent all values of the original
type, the value is converted to an int; otherwise, it is
converted to an unsigned int."
Well, C is making the simple assumption that registers are
That's not a simple assumption, it's acknowledgment that a C
program runs on real
hardware not a virtual machine like Java or C#.
This is no longer true of course, as "registers" are "SIMD
SIMD and GP are not related and one will never replace the other.
SIMD is generally for floating point, when it is used for
integer, it is not for the usual integer semantics and requires
special handling in any case.
So I am pretty sure it will lead to suboptimal code in some
Can also be said if it had another semantic.
While quite often surprising for people coming from other
languages, I think that Walter's persistence in following the
basic C rule is a good thing.
Why is it a good thing?
For the same reason it is in C. If the ambition for D is to be a
system language then it should avoid introducing artificial
abstractions and work with the machine it runs on, not against.