logoalt Hacker News

xigoiyesterday at 11:02 AM4 repliesview on HN

Are there any languages other than C and C++ that have this “nasal demons” interpretation of undefined behavior?


Replies

josephgyesterday at 11:57 AM

I assume this is a product of sufficiently advanced compilers. Other LLVM languages almost certainly suffer from this too, including Zig, Swift and unsafe rust.

show 1 reply
bregmayesterday at 1:23 PM

Are you asking if there are programming languages in which how undefined behaviour behaves is strictly defined?

FartyMcFarteryesterday at 11:17 AM

I think so, at least when it comes to assuming that multi-threading data races don't happen.

IshKebabyesterday at 1:28 PM

Rust and Zig do, and I think also Go.