Hacker News new | ask | show | jobs
by vips7L 1857 days ago
I really think Goetz/the Java language people are waiting to see if nullable types actually pay off in C#/Kotlin first, like with every feature, before considering it.
1 comments

In other areas they're already trying. e.g.

  if (o instanceof SomeClass) {
    o.someClassMethod();
  }
Following this line of reasoning I could want to assign it to a local var:

  if (o instanceof SomeClass) {
    final var s = o;
    ...
  }
An analogous situation arises with null:

  if (o != null) {
    final var s = o;
    ...
  }
Making the type of `s` a non-null type of `o`s type.

The annoying thing with Java language development is that they just don't seem interested in rounding it out with consistency/completeness.