Re:Switching to Elixir
by weatherlight on Friday November 10, 2023 @10:24AM
(#38219976)
types aren't a substitute for tests.
let add : int -> int -> int = fun a b ->
Random.self_init ();
Random.int 100
I can't imagine building something like this in a dynamically typed language. The way I see it, static typing is like writing inline unit tests to save yourself many, many headaches later.