[snip]
Undefined behaviour usually means one of these:
^^^^^^^
- Nothing happens (possibly returning 0 or -1 depending on situation)
- An error is thrown.
- Pike dumps core.
There is no place for 'usually' in the programming API documentation. It's an 'either-or' situation, no 'maybe-perhaps'. The error conditions, the calling conditions, the expectations as to the parameters must be documented unambiguously and clearly. It isn't that hard to add another sentence to the documentation:
If an object does not contain the _m_delete method, an error will be thrown.
or just change the 'if' to must in the current sentence. And:
Returns The value that was removed will be returned.
Not a word about an error. Another source of uncertainty. For the record - I can change all that in the CVS, no problem, I'd be glad to do it. But I don't want to (again) step on anybody's oversensitive toes.
Or is my English failing me again?
It could be logic this time :)
I wish it was, but I'll be bold enough as to disagree :)
marek