|
|
|
|
|
by 013a
2616 days ago
|
|
The big problem with type inference, at least at API boundaries, is that its hard to tell who's "fault" an error might be. FuncA() returns T1, inferred. FuncB() expects it to return T2. Is FuncB expecting the wrong thing? Or is FuncA returning something incorrect? Always annotating the return types fixes this. That's one area that I think inference is always risky. |
|