4 ms·
Yeah, this is stupid. If the language creators put a feature there, use it. I really don't buy the love that some have for using signed variables when they do
by raverbashing 8y ago
Yeah, this is stupid.
If the language creators put a feature there, use it.
I really don't buy the love that some have for using signed variables when they don't make sense.
As a start, you only need one comparison to check if it's within range, as it's always > 0
- andrewflnr 8y agoNot using a feature because it's broken by default is perfectly valid. All those style guides that mandate signed ints do so because someone got burned by an overflow that wasn't caught.
- raverbashing 8y agoUnsigned are not broken by default, and I've been bitten much more by ints that overflow and go negative. Funny how that's not "broken by default" (it isn't) to the same people.