If you read the literature, particularly “Types and Programming Language”, you’ll find that “dynamic typing” isn’t even considered typing. If you can have a type error at runtime you’ve defeated the reason to add a type system: to reduce runtime errors. The hope is that “well-typed programs don’t go wrong” tho there are some limits to what any type system can do (e.g. Rice’s Theorem).
That said. Static v. Dynamic is much more precise than Strong v. Weak and should be preferred.
Implicit v. Manifest is less useful just because it’s a broad spectrum, basically inculcating how much type inference is done and “how much” generally depends a lot the input program(s). Haskell does whole-program inference, tho GHC (the only Haskell compiler) has a number of syntactic forms that can’t be inferred. Scala only does local inference. C doesn’t infer types, though is gets close with how it treats functions with no-argument in the prototype and varargs stuff. C++ uses auto for some type inference, which is still somewhat manifest, but also mostly implicit.
I think weak typing is a good name for when there are invisible coercions, but that doesn’t actually have much to do with proper types.
Anyway, great comment, If more people would use static/dynamic and explicit/implicit instead of strong/weak, there’d be less miscommunication.
Practically, dynamic typing is quite different from no typing, such as with the B programming language, although I agree that it often defeats certain benefits of type systems.
Agreed. I don’t think it should be called typing; it’s more tagging (yes, like tagged unions). But, I don’t think I’ll see that semantic shift in my lifetime.
Anyway, I prefer my types static and my functions curried, which is why I do PureScript, Idris, and Haskell for my personal projects.
If you read the literature, particularly “Types and Programming Language”, you’ll find that “dynamic typing” isn’t even considered typing. If you can have a type error at runtime you’ve defeated the reason to add a type system: to reduce runtime errors. The hope is that “well-typed programs don’t go wrong” tho there are some limits to what any type system can do (e.g. Rice’s Theorem).
That said. Static v. Dynamic is much more precise than Strong v. Weak and should be preferred.
Implicit v. Manifest is less useful just because it’s a broad spectrum, basically inculcating how much type inference is done and “how much” generally depends a lot the input program(s). Haskell does whole-program inference, tho GHC (the only Haskell compiler) has a number of syntactic forms that can’t be inferred. Scala only does local inference. C doesn’t infer types, though is gets close with how it treats functions with no-argument in the prototype and varargs stuff. C++ uses auto for some type inference, which is still somewhat manifest, but also mostly implicit.
I think weak typing is a good name for when there are invisible coercions, but that doesn’t actually have much to do with proper types.
Anyway, great comment, If more people would use static/dynamic and explicit/implicit instead of strong/weak, there’d be less miscommunication.
Practically, dynamic typing is quite different from no typing, such as with the B programming language, although I agree that it often defeats certain benefits of type systems.
Agreed. I don’t think it should be called typing; it’s more tagging (yes, like tagged unions). But, I don’t think I’ll see that semantic shift in my lifetime.
Anyway, I prefer my types static and my functions curried, which is why I do PureScript, Idris, and Haskell for my personal projects.