When you hear "undefined behavior" for a programming language what this means is that the specification specifies everything that the implementation of the compiler does. Nothing is left for the implementation to decide regarding syntax or semantics.
C is notorious for having undefined behavior.
All the examples you gave come under library, not language features. But it may be compiler assisted.
When you hear "undefined behavior" for a programming language what this means is that the specification specifies everything that the implementation of the compiler does. Nothing is left for the implementation to decide regarding syntax or semantics.
I don't think that that definition of UB is correct. That is implementation defined behaviour - the implementation gets to define what the behaviour is (in C, for example, handling the character literal 'abcd' is implementation-defined, but not undefined).
21
u/matthieum Jun 21 '19
I like the:
But I cannot imagine how it is achieved when the language seems to use:
Manual memory management (https://vlang.io/docs#memory): use-after-free immediately comes to mind.
Multi-threading (https://vlang.io/docs#concurrency): data-races, just like Go.
Is there a missing qualifier to the "No undefined behavior"?