3 ms·
Are there any languages other than C and C++ that have this “nasal demons” interpretation of undefined behavior?
by xigoi 8mo ago
Are there any languages other than C and C++ that have this “nasal demons” interpretation of undefined behavior?
- FartyMcFarter 8mo agoI think so, at least when it comes to assuming that multi-threading data races don't happen.
- josephg 8mo agoI assume this is a product of sufficiently advanced compilers. Other LLVM languages almost certainly suffer from this too, including Zig, Swift and unsafe rust.
- deleted 8mo ago[deleted]
- bregma 8mo agoAre you asking if there are programming languages in which how undefined behaviour behaves is strictly defined?
- xigoi 8mo agoI’m talking about the “non-local” flavor of undefined behavior. For example, I’d expect the following code: int x; printf("%d", x - x); to always print 0, but it can it fact do anything at all.
- IshKebab 8mo agoRust and Zig do, and I think also Go.