logoalt Hacker News

codedokode • today at 4:47 PM • 1 reply • view on HN

Not AI but poorly designed programming languages ignoring integer overflows.


Replies

vlovich123 • today at 4:51 PM

I don’t know any systems programming language that doesn’t ignore integer overflow/underflow in release builds. IMHO this is a CPU design flaw - integer operations should carry a flag indicating if the operation is allowed to wrap or if it should generate a trap. Then there wouldn’t be a performance penalty for this and languages like Rust could have it be trapped by default.

➕ show 5 replies