Beginners have very incomplete mental models of programming languages (if they didn't, they wouldn't be beginners...) I believe the experience of the PLT group, who have been teaching introductory programming for some 20 years and definitely understand type systems, is that static types can get in the way of learning. There are two reasons:
- Type errors for most type systems are very difficult to diagnose for beginners. They often aren't, for example, located on the actual error location in Hindley-Milner style type inference.
- Allowing students to run their code helps build a correct mental model. In particular it allows them to locate the errors in their code.
Note that Pyret does have a facility for dynamic checks that serves a similar purpose to static types.
- Type errors for most type systems are very difficult to diagnose for beginners. They often aren't, for example, located on the actual error location in Hindley-Milner style type inference.
- Allowing students to run their code helps build a correct mental model. In particular it allows them to locate the errors in their code.
Note that Pyret does have a facility for dynamic checks that serves a similar purpose to static types.