Hacker News new | ask | show | jobs
by Dylan16807 37 days ago
Welcome to C.

But more seriously it's the job of the program to not do undefined things.

1 comments

It's the job of a language designer to define everything.
C should do better about the things that could be readily defined, but there's no way to have arbitrary pointers and define everything.
> but there's no way to have arbitrary pointers and define everything.

What's the undefined behavior in assembly?

Assembly is kind of at the crossroads of everything being defined and nothing being defined, when you consider things like writing random data to memory and executing it... But anyway here's the first thing I found to answer that: https://news.ycombinator.com/item?id=9578178

Probably more important, way too many things in assembly vary by exact model. Can you name a portable language that fits those criteria?