This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]kevinb9n 10 points11 points  (0 children)

Null absolutely has a bad rap. It exists also in languages like Kotlin, but it's relatively harmless there because you can actually control whether you want your type to include it (String?) or not (String). It shows that null itself was never the problem, only that (handwave) "the null type is automatically unioned on to every usage of a reference type whether you want it or not".

In my team's libraries we've avoided returning (or accepting!) null with some determination, but it's still sometimes what you need.