3 ms·
Null exceptions can even happen in Java. I wasnt refering to those.
by joelbluminator 5y ago
Null exceptions can even happen in Java. I wasnt refering to those.
- whakim 5y agoBut most types (besides primitives) in Java are nullable, right? Sorbet literally wouldn't let you write this code: https://sorbet.run/#%23%20typed%3A%20true%0Aextend%20T%3A%3ASig%0A%0Asig%20%7Bparams%28x%3A%20T.nilable%28String%29%29.void%7D%0Adef%20add_one%28x%29%0A%20%20return%20x%20%2B%20%22another%20string%22%0Aend https://sorbet.run/#%23%20typed%3A%20true%0Aextend%20T%3A%3A... Null is simply the most frequent example of this issue. Getting an integer rather than a string is super common, for example. Or a string instead of a date.
- joelbluminator 5y agoWhat does super common mean? Do I see these bugs once a month? No, I do not. Null exceptions are common I agree with that. For me its not enough to appreciate something like Java or Go but I understand the argument.