Hacker News new | ask | show | jobs
by kqr 810 days ago
> Keep inference, it tells you when your annotations are inconsistent with tour code.

Isn't that plain type checking, rather than type inference?

Type checking detects inconsistencies, type inference assigns types in ways that avoid inconsistencies.

2 comments

Right. I guess I meant annotate most of the things. (Top level things, complicated inner functions …) A few temporary values (next = current + 1) might go un-explicitly-typed. Anonymous functions will go untyped. I should have said “ensure your intentions with regards to types are clear”.
Clearly u/z5h meant that type annotations should be optional and used where not inconvenient. That's how I took it anyways.