AstonJ
In an age of AI, is static typing even necessary?
Inspired by Andrew’s post in another thread about types:
If the main benefit of static typing is to catch errors, and most people think it’s only a matter of time before AI will be so advanced they’d consider it a necessity, are types then even necessary? Could it be argued types may help in the short term but it’s only a matter of time when they will become superfluous and redundant?
- I think static-typing will always be useful
- I think static-typing will be useful for the short term
- I’m not a fan of static types/have no intention of (or don’t think I’ll be) using them/don’t think they are worth it now or will be in the foreseeable future (feel free to elaborate in thread)
- Other (please say in thread)
(Please note this is a general discussion, not necessarily about Elixir)
Most Liked
dimitarvp
Static typing will be always useful because it reduces the problem search surface for any computer, be it a strict algorithm or an LLM. Less assumptions + more certainty = better solutions.
avi-turetsky
I voted other. 1) I think we’re a long ways away from LLMs/AI getting to the point where where types are superfluous. 2) As an engineer I’ve simultaneously enjoyed the wild west of Ruby and and more “locked down” languages with modern type systems. I could honestly go either way (right tool for the job, etc.). But I do think types will be invaluable for the next ~5 years. LLMs perform best when they have access to quick self correcting feedback loops. Right now types and tests serve that role.
jdiago
Here’s a screenshot from the Matz keynote at RubyKaigi 2025 where he talks about this very topic. My only wish is for better subtitles since the ones there are from the live translation during the talk so it’s a bit hard to understand the context.
Whole video here:
garrison
The main benefit of a type system is providing a clear format for documentation. After that, the main benefit of a type checker is ensuring the documentation is correct
After that, you get the additional benefit of quickly catching small mistakes as you write code, which is convenient for a tighter feedback loop.
Of course if the model is writing code for you then the documentation is for it rather than you, so the question is really “is documentation useful for LLMs?”, and thus far it seems like the answer is “yes, critically”.
Type systems and even unit tests are wholly inadequate for proper correctness testing, you need fuzz/property-based tests and, for distributed systems and things which touch the disk or network, you need a deterministic simulator as well. This requires putting at least as much creative effort into designing tests as you do into designing the program itself, if not more. I doubt current models are as yet capable of that, but who knows where the goalposts will end up!
cevado
One other that I like on the topic is this rant from Rich Hickey
the video excerpt from the rant(in the description has a link for the full talk
I have an impression that people that really like static typing are the ones that are attached to the editor. While people that prefers dynamic typing is more driven by the repl. whenever i’m working the first thing I do is start iex and then I start doing my changes and call recompile on the repl.









