|
|
|
|
|
by Existenceblinks
2540 days ago
|
|
I'm all in static typing, but writing Elixir has ways less anxiety than any dynamic typed languages I've written. These are features that help eliminating uncertainties: 1. Function head pattern matching This also includes anonymous functions used in Enumerable functions like map, reduce. Which is my most favorite way of using pattern matching 2. Guard clause It's part of function definition so it's visible in very nice ways; not mess with the body. 3. Process supervision strategies Let it crash! The elegant way of dealing with exceptions and unexpected errors. It's a fair trade with static typing. |
|