METABYTE
Back to articles

Elixir v1.20: Now Gradually Typed (But You Can Ignore It)

Elixir v1.20 finally adds gradual typing — like that friend who swore dynamic typing was freedom but quietly started adding type annotations.

4 iunie 20261 min read
Elixir v1.20: Now Gradually Typed (But You Can Ignore It)

Elixir v1.20 is out, and the headline feature is gradual typing. The Elixir team finally decided that "everything is a message" is nice, but sometimes you want the compiler to say, "Are you sure that's a string, not an atom?"

You can now add type annotations to functions, and the compiler will check them at compile time. If you're a TypeScript fan but your heart belongs to the BEAM — welcome. If you love dynamic typing as is — just don't write types, and everything works as before. No pressure.

Of course, this isn't full static typing — think of it as a seatbelt: not mandatory, but it saves your ass in a crash. For large projects, it's a lifesaver: fewer bugs, easier refactoring, and you can write fewer tests (but you probably shouldn't).

Other goodies: improved AST manipulation, new collection functions, and the usual bug fixes. A solid release — just with types now.

METABYTE studio comment: Gradual typing in Elixir is a great reminder that we also have strict types in our projects... until the client says, "Let's do it in JavaScript." Just kidding. But Elixir just became even more compelling for backend work.

NEXT STEP

Liked the approach?

We apply the same principles to client projects: AI, automation, products that don't die after launch.