Comment

Comment by viraptor

Considering the time when it was written, it could mean for example Java's ridiculously long generic declarations which couldn't be inferred or aliased.

Things are much better and more ergonomic these days.

Specific example - some languages will allow you to do:

    fun f(x: int):   // return type inferred
      var foo = something(x)
      return foo
While others need (including type erasure getting in the way):

    Complete<Version<Of<Generic, Foo>>>> f(int x) {
        Complete<Version<Of<Generic, Foo>>>> foo = (Complete<Version<Of<Generic, Foo>>>>) something(x);
        return foo;
    }
parent viraptor 7 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton