3 ms·
No. In this case there is no undefined behaviour, the way this is handled is defined, but to the parent it seems inconsistent. Undesired behaviour can not be r
by yoz-y 9y ago
No. In this case there is no undefined behaviour, the way this is handled is defined, but to the parent it seems inconsistent.
Undesired behaviour can not be really leveraged for optimisation, and in any case, high(er) level languages should not have UB in their design.
- catnaroek 9y agoIf your program's correctness depends on `nil` being handled this or that way, your design is broken. Fortunately, most programs aren't designed this way: messages to `nil` are seldom actually intended, whether the language's semantics considers them a legitimate operation or not, and whether they are “helpfully” trapped at runtime or not.