by VectorLock · 7y ago · 0 comments
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;
}I suppose it helps that the types aren't strictly required too, so you can side-step them if necessary.