Hacker News new | past | comments | ask | show | jobs | submit login

How are they making it worse?

In any case, there already exist solutions in place:

https://checkerframework.org/manual/#example-use

https://github.com/uber/NullAway




The code ends up looking like:

  Optional<Integer> foo;

  //....

  if (foo != null) {
      foo.and_then(new Consumer () {
            function accept(Integer foo) {

            }
      });
  }


I would never assign null to an Optional nor use a library that returned one.

To ensure assignment before use make it final.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: