Elixir v1.7 released
I like Elixir and the community is amazing, especially for such a young language. Particularly the quality of the standard library as well as the more popular open source libraries is really high.<p>That said, there&#x27;s one design choice that I simply never understood: the dynamic typing. Bear with me, I&#x27;m not trying to start another holy war here, I have an argument. Thing is, Elixir very seldomly <i>uses</i> its dynamic typing. Ruby has method_missing and monkey patching, JavaScript (finally) has Proxies, but Elixir has none of these. In fact, most Elixir code is particularly undynamic in nature.<p>All Elixir code that I&#x27;ve seen <i>looks</i> more like a non-OO version of typical Java or C# code. Notably, variables and seldomly change type. Function arguments are seldomly &quot;a string or an array&quot; like is common in JavaScript. Structured arguments are typically <i>either</i> used as a dictionary, <i>or</i> as a struct (the Elixir word for object, record, whatever), but not really ever &quot;a little bit of both&quot;. Modules always have the same set of functions, the functions always have the same signatures.<p>Elixir replaces Ruby&#x27;s monkey patching with <i>macros</i>. They feel a bit similar, but notably macros are entirely compile time. There&#x27;s nothing dynamic about them.<p>I feel like if Elixir had unambitious static typing, more akin to C# or TypeScript than to Haskell, it&#x27;d have significantly better tool support, code would be much much easier to read and follow, and virtually all code that works now would still, well, Just Work except that you&#x27;d need to specify types on function arguments of course.<p>Of course, there&#x27;s typespecs, but anyone who&#x27;s ever tried to use them knows how abysmal the development experience is. Dialyzer error messages are impossible to figure out, often showing errors multiple functions down the stack from where the typing or programming error actually is. The syntax is weird, minimally documented and not integrated with the rest of the language. I&#x27;m impressed by how well most bigger libraries are typespec&#x27;ed, given how hard it is to get that right.<p>All that said, I&#x27;m well aware that even an &quot;unambitious&quot; type system would be hard to accomplish. Making a dynamically typed language surely must be easier than an ergonomic statically typed one - especially if the underlying VM does not depend on static types. Maybe the simple reason Elixir lacks a good static type system is that it&#x27;s a lot of work.