6 ms·
If the default behaviour of nil on a send for a method that doesn't exist was to return nil, then nils will flow through your program further than anticipated a
by barrkel 11y ago
If the default behaviour of nil on a send for a method that doesn't exist was to return nil, then nils will flow through your program further than anticipated and debugging will become more difficult.
Nils will get into data structures and figuring out when and where they got there will become more work. You'd end up writing a lot more logic testing for nil and throwing an exception when it's found, to avoid the nil propagating further.