Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dataflown
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
3 ms
·
1.
▲
by
dataflown
3mo ago
Of course unsigned is defined. That's besides the point. The point is: how often in your code, do you expect 1 minus 2 to equal a very large number, vs. the number -1.
2.
▲
by
dataflown
3mo ago
No. It says the reverse: "11. unsigned. Use unsigned if necessary." Unsigned is necessary only if you're working with bit fields, bit masks or require explicit modulo n-bit arithmetic. For all other cases, use signed
3.
▲
by
dataflown
3mo ago
Actually, in that case, no. Blogger hasn't bothered to refer to those well known and detailed opinions, from very experienced authorities, and provide detailed rebuttal to those authorities claims, so his opinion can be safely ignored.
4.
▲
by
dataflown
3mo ago
Stroustrup recommends int over unsigned. Dijkstra recommends int over unsigned. Google coding guidelines recommend int over unsigned. Blogger recommends unsigned over int. Tough choice.