top | item 31735918

(no title)

giords | 3 years ago

Too bad you need external tools anda lot of boilerplate that you must remember to enforce to achieve this, because it's an after thought and not a language feature.

And there's 7-8 different annotations to mark nullability, all slightly different in some detail.

It's a bloody and messy hell.

discuss

order

kaba0|3 years ago

Sure, language-support would be better indeed, but in practice the often encountered annotations are supported by every tool, and the only relevant setting is whether everything is nullable by default or nothing is.

V-2|3 years ago

It's still not enforced by the language itself, so nothing stops a third party library (that you have to integrate) from not using the annotations, and then the unknown nullability exerts a domino effect on your own code, "infecting" it with uncertainty.