3 ms·
As a typescript developer who had to make something in java, it's so bizarre and alien to me that anything anywhere might be null, and I have to manually check
by gcau 3y ago
As a typescript developer who had to make something in java, it's so bizarre and alien to me that anything anywhere might be null, and I have to manually check if things are null everywhere, and then play a guessing game when I get a NPE. It feels like the most unsafe, unsound thing ever.
- kaba0 3y agoYou could add a few @Nullable annotations to your code where you might return null and be completely null-safe. Nullness is a so-called trivial property, so it can be statically analyised even in such a bolted on way.