AstonJ

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)
0 voters

(Please note this is a general discussion, not necessarily about Elixir)

Most Liked

dimitarvp

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.

11
Post #2
avi-turetsky

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

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

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 :slight_smile: 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

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.

Where Next?

Popular in Discussions Top

bartblast
This thread is dedicated to announcing updates to the Hologram documentation, as well as discussing any ideas for improvements and sugges...
New
neilberkman
Carson Katri from DockYard posted today about swift-erlang-actor-system, which enables Swift programs to join Erlang clusters as distribu...
New
sym_num
I created a Forth processor in Elixir. This is my hobby project. https://github.com/sasagawa888/Forth
New
stefannovak
Hi all, I’m going to be giving a little 20 minute tech talk at my company which uses .NET C# across all of our 100ish size IT team. I’m ...
New
New
arcanemachine
Just wondering what the community currently thinks, prefers, and/or recommends for working with UI components. (e.g. daisyUI, MishkaChele...
New
AstonJ
Bart’s talk about Hologram got me wondering what kind of apps or components people are thinking about building (or think could be built) ...
New
AstonJ
A remark @Garrison made… ..has already inspired a thread for the technical side of reclaiming our internet, but there is of course anot...
New
lessless
I wonder if it’s possible to mimic a simple “class reopening”/inhertinace-based SEAM in Elixir to alter a module’s behaviour without edit...
New
travisf
In upgrading from Ecto 2 to Ecto 3 I’m dealing with a failing test. If I use ExMachina build(:address) I’ll get an error trying to put_e...
New

Other popular topics Top

lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
273 38985 115
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New
AstonJ
by Lance Halvorsen Elixir and Phoenix are generating tremendous excitement as an unbeatable platform for building modern web application...
460 27162 124
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New

We're in Beta

About us Mission Statement