Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
xigoi
4 months ago
|
parent
|
context
|
favorite
| on:
Rust is just a tool
Are there any languages other than C and C++ that have this “nasal demons” interpretation of undefined behavior?
josephg
4 months ago
|
next
[–]
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.
bregma
4 months ago
|
prev
|
next
[–]
Are you asking if there are programming languages in which how undefined behaviour behaves is strictly defined?
xigoi
3 months ago
|
parent
|
next
[–]
I’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.
FartyMcFarter
4 months ago
|
prev
|
next
[–]
I think so, at least when it comes to assuming that multi-threading data races don't happen.
IshKebab
4 months ago
|
prev
[–]
Rust and Zig do, and I think also Go.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: