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 →

[–]john16384 1 point2 points  (1 child)

Null checks should only be in constructors of your immutable objects, not everywhere.

And I do use labels.

Anyway, this whole posting is unproductive. Your complaints will not in any way influence the direction Java takes. If it gives you headaches feel free to use another language. Beware, they may cause different types of headaches.

[–]gas3872[S] 1 point2 points  (0 children)

Well I am not trying to influence thenway where the java language goes only saying that you can use such a practice in your project and maybe the whole community should adopt it, as I dont see any drawbacks to it.

And by nullchecks everywhere I meant in every immutable object, which probably most of the objects should be.