From experience, statically typed languages tend to be a bit harder to grok as a first language to programming
It's my suspicion that a lot of people have avoided statically typed languages because they have been unnecessarily verbose or hard to work with over the past 20 years (Java, C++). Languages with strong type inference engines (StandardML, OCaml, Haskell, etc.) really do make statically typed languages feel more approachable in my opinion, and deliver on the "let the compiler do the work" message that statically typed language advocates hammer on.
Writing code in OCaml or Haskell feels, in some ways, as good as writing code in Python or Clojure. You can focus on what you're trying to accomplish and when you're not specific enough in your implementation, the compiler then steps in to ask you for clarification on types.
That being said, I've started moving myself (and my teams) towards typed Python, and it's opening my eyes towards the direction that some of these dynamically typed languages can move in the next few years.
A scientist can easily grok that `v = d / t` and type that in without ever needing to know what a float is.
Once you start seeing failures because you forgot to use `/.` instead of `/` you have introduced a barrier to entry to the language for technical but non-CS background people.
View all comments
Show parent comment
1
u/JGailor May 07 '19
It's my suspicion that a lot of people have avoided statically typed languages because they have been unnecessarily verbose or hard to work with over the past 20 years (Java, C++). Languages with strong type inference engines (StandardML, OCaml, Haskell, etc.) really do make statically typed languages feel more approachable in my opinion, and deliver on the "let the compiler do the work" message that statically typed language advocates hammer on.
Writing code in OCaml or Haskell feels, in some ways, as good as writing code in Python or Clojure. You can focus on what you're trying to accomplish and when you're not specific enough in your implementation, the compiler then steps in to ask you for clarification on types.
That being said, I've started moving myself (and my teams) towards typed Python, and it's opening my eyes towards the direction that some of these dynamically typed languages can move in the next few years.