Re:Undefined Behavior in 2017
by readittwice on Wednesday July 05, 2017 @05:31AM
(#14700999)
The same is true in C/C++: Function argument evaluation order is unspecified. BUT: that doesn't mean this is undefined behavior, it is just unspecified.
unspecified != undefined behavior
See this Stack overflow answer for an explanation: https://stackoverflow.com/questions/2397984/undefined-unspec...
This would not be what is called undefined behavior per the C standard, but unspecified or implementation-defined behavior. The bad thing about "undefined behavior" is that the implementation is basically allowed to do whatever it wants, while unspecified and implementation-defined behavior still has sane semantics. Unspecified behavior allows the language implementation to choose any one from several possible implementations, implementation-defined behavior requires the language implementation to define the semantics itself.
lua is no way a "low level" language
Are you sure that undefined, instead of merely unspecified?
Ie function arguments are still evaluated in some (possibly changing) order. C++ undefined behavior allows to eg format your hard disk or launch the nukes.
https://github.com/LuaJIT/LuaJIT/issues/238