in reply to
Re: The most useful form of typing is...
in thread The most useful form of typing is...
I like your definitions, so I'll try to put together a short list of some of the languages I know and where they fit in the scale.
- Strong and static: Haskell, ML, PL/SQL, Java (but only if they implemented generics properly so you wouldn't need typecasting)
- Strong and dynamic: Perl, Lisp, Scheme
- Weak and static: C, C++, Pascal, Java (as is)
The reason (as I understand it) that it is possible to have weakly-typed but also statically-typed languages is because of typecasts: you are essentially instructing the compiler to ignore the type declarations you've already given it. Also note that the first two languages I listed under Strong and Static allow total type polymorphism so that the same functions and data structures can apply to arbitrarily many types, but compile-time resolution still has to be possible.