6 ms·
The wrong assumption in that page is that Static Typing implies the need for type hints or annotations. In fact, type inference is a thing. Most of the langua
by arialdomartini 3y ago
The wrong assumption in that page is that Static Typing implies the need for type hints or annotations.
In fact, type inference is a thing.
Most of the languages with Hindley Millner type system (such as oCaml, F#, Haskell, PureScript) do feel dynamic (e.g., developer does not need to hint the compiler) yet they are purely static typed.
What is the argument against having Python checking the types, without asking the developers to change their code?
- tsss 3y agoHaskell has to pay _a lot_ to achieve full type inference. A price that is way too high imo for a feature that nobody uses anyway. Among many other things it precludes subtyping, which I assume Python relies on heavily.
- tome 3y agoI suspect almost every Haskell uses full type inference almost constantly, if only to avoid having to write out top level types by hand. I know that applies to me. I've never considered that I paid a price for it. For me it was just something that came free with a language that is nice in other ways too. What price are you seeing? (For me, absence of subtyping is a feature.)