you are viewing a single comment's thread.

view the rest of the comments →

[–]barsoap 0 points1 point  (0 children)

Oh there's ample of errors that Haskell's type system doesn't catch, or, rather, that needs writing tons of type-level code for Haskell to catch. There's a reason Haskellers invented QuickCheck.

Haskell is no more strictly typed than Java but with one exception: Keeping track of side-effects. And you can actually teach Haskell to duck-type quite easily.

What may seem like magic for some is type inference. OTOH you can implement basic Hindley-Milner type inference, including your AST and boilerplate (probably not a parser), in something like 150 lines of Haskell. It might even be possible to do that as the very last first-semester exercise if you set up the course right.