2 ms·
The change in typing is not really much of a jump when you realise that Haskell's type inference means you don't have to declare too many type signatures up fro
by mreid 17y ago
The change in typing is not really much of a jump when you realise that Haskell's type inference means you don't have to declare too many type signatures up front. A lot of type signatures in Haskell code are not technically necessary and are usual there for documentation.
For example, this is perfectly valid Haskell code and doesn't mention a single type:
factorial n = if n > 0 then n * factorial (n-1) else 1
The bigger conceptual shift will be from Python's mainly procedural style to Haskell's (or Clojure's) very strong emphasis on a functional style.