4 ms·
Inferred types are really great, but I feel they do not scale. Inside a method/function? Generally fine, but the signature, including the return type, had bette
by fuzzy2 8mo ago
Inferred types are really great, but I feel they do not scale. Inside a method/function? Generally fine, but the signature, including the return type, had better be explicit.
Also, I think there was some performance issue with too much inference? Could be wrong, could also be fixed.
- g947o 8mo agoThis. As soon as you need to use the type in another function (e.g. function parameter), you'll discover that it's better to just write it out.
- epolanski 8mo agoThey do scale, but explicit types have two bonuses in my eyes: 1. can be read without a compiler, useful when reading PRs 2. They make the compiler work less, it's easier to check than infer