food for thought - swift 5 released - bottom types, string interpolation, and stuff.

Timon Gehr timon.gehr at gmx.ch
Sun Apr 14 00:52:18 UTC 2019


On 13.04.19 07:18, H. S. Teoh wrote:
> Personally, even though I understand perfectly well what (x & 1) means,
> I much rather write it as (x % 2) instead and let the optimizer
> implement it as (x & 1)

(x % 2) and (x & 1) are not equivalent in all contexts. The modulo 
operator is insane, and there isn't really a good way to fix it because 
the hardware is doing it wrong.


More information about the Digitalmars-d mailing list