food for thought - swift 5 released - bottom types, string interpolation, and stuff.
Walter Bright
newshound2 at digitalmars.com
Thu Apr 11 23:03:00 UTC 2019
On 4/11/2019 2:21 PM, Dennis wrote:
> I don't get it. What's shocking about it, that people often need to know the
> parity of a number or that people aren't born with the knowledge that the %
> operator can be used for that?
bool isOdd(int i) { return i & 1; }
Filling the standard library with trivia is not a good idea. Not knowing about a
common operator is not a reason to add library functions.
More information about the Digitalmars-d
mailing list