2 ms·
That's not really the same. Messaging nil is not necessarily an error. Making it an error is just an arbitrary language choice. Messaging nil in Objective-C isn
by mikeash 11y ago
That's not really the same. Messaging nil is not necessarily an error. Making it an error is just an arbitrary language choice. Messaging nil in Objective-C isn't an uncaught error, but an explicitly allowed action with fully defined results.
One could certainly argue that making nil messaging an error is better, but either way it's a different sort of reasoning.