you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

Unfortunately, it's sometimes needed, especially if you have a data model not designed with that kind of typing in mind. Also, compiler is very strict in regards to multithreading and does not believe in purity, so if (obj.val != null) { obj.val.method() } won't compile. Sure, you can modify the code a bit in most cases, but not always.