I have two questions that I've come upon lately:
1) How was it decided that there should be implicit conversion
between signed and unsigned integers in arithmetic operations,
and why prefer unsigned numbers?
E.g. Signed / Unsigned = Unsigned
Is this simply compatibility with C or is there something greater
behind this decision.
2) With regard to reducing template instantiations:
I've been using a technique similar to the one mentioned in the
video: separating functions out of templates to reduce bloat.
My question is: does a template such as:
T foo(T)(T x)
if (isIntegral!T) { return x; }
Get instantiated multiple times for const, immutable, etc.
qualifiers on the input?