▲ | bigstrat2003 5 days ago | |||||||||||||||||||||||||||||||||||||||||||||||||
That is not true, that is a very specific definition of UB which C developers (among others) favor. That doesn't mean that another language can't say "this is undefined behavior" without all the baggage that accompanies the term in C. | ||||||||||||||||||||||||||||||||||||||||||||||||||
▲ | zozbot234 5 days ago | parent | next [-] | |||||||||||||||||||||||||||||||||||||||||||||||||
It's literally how the term "UB" is defined, and understood by experts. Why would anyone want to say "undefined" when they really mean "unspecified"? That's just confusing. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||
▲ | bakugo 5 days ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||||||||||||||
"Undefined behavior" is not a meaningless made up term that you can redefine at will. The word "undefined" has a clear meaning: there is no behavior defined at all for what a given piece of code will do, meaning it can literally do anything. If the language spec defines the possible behaviors you can expect (even if the behavior can vary between implementations), then by definition it's not undefined. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||
▲ | gliptic 5 days ago | parent | prev [-] | |||||||||||||||||||||||||||||||||||||||||||||||||
The author is using the term in the way that everyone else understands it. They are not aware of your unusual definition. |