Change of mind
Static typing in dynamic languages
For a long time, I was the proponent of dynamic languages. They were more expressive and gave you more freedom to structure the program. Plus they were more concise. Typing all those type annotations was a waste of time.
Until I worked with Haskell for a while. It’s a strongly typed language, there’s no way around it.
Haskell is still expressive. It uses the smart type inferring system. No more wasted time telling the compiler every single variable type. It can infer most of that information automatically.
Uncaught TypeError: Cannot read property 'split' of undefined
or the common Ruby on Rails view problem:
NoMethodError: undefined method `split' for nil:NilClass
Compiler can actually ensure that this will not happen.
That eliminates certain types of unit tests. The tests checking that the code will handle malformed inputs.
I can’t wait to investigate it and to incorporate it into my daily workflow.