4 ms·
> Dynamically typed languages can have strong type systems, eg Haskell, some parts of Rust can be inferred. To be strictly accurate, Rust and Haskell both hav
by CuriousCosmic 4y ago
> Dynamically typed languages can have strong type systems, eg Haskell, some parts of Rust can be inferred.
To be strictly accurate, Rust and Haskell both have strict type systems. It's just that like you mentioned, the types are often inferred at compile time via type inference rules.
This differs from dynamically typed languages as inferred types always have a statically known type while dynamic types have a type which is interpreted at runtime and which can be reinterpreted.
- kqr 4y agoHaskell has a static type system. "Strictness" in PL theory usually refers to an eager evaluation strategy. But yes, you are correct. The comment you replied to does not make sense. Haskell is not dynamically typed at all. (Though as with any statically typed language, you can create a Grand Unified Type that stores everything and pretend it's dynamic.)
- ekleraki 4y agoYou are correct my comment did not make sense. What I meant was that types may be inferred but that is not the same as dynamic typing.
- marcosdumay 4y ago"Strictness" when applied to types usually refers to the existence of implicit type conversions. Overall, "strictness" is a really bad word to use, because it has thousands of different meanings. But on the context of types, I don't know of any better synonym.
- CuriousCosmic 4y ago> Haskell has a static type system. "Strictness" in PL theory usually refers to an eager evaluation strategy. Ah yep. Meant static there and fumbled my words. That's what I get for browsing HN first thing in the morning before coffee.