Is Julia still as relevant in the age of AI agents?

My suspicion is that in the fullness of time, it will go the other way: AI agents will make (and perhaps already are making) Julia more relevant, not less. There are three reasons:

  • they remove one of the main barriers to not trying Julia
  • they allow Julia developers to fill gaps in the ecosystem quickly
  • I think Julia offers agents a more efficient development process (if you use MCP)

The last point is the most subtle, and here I’m not talking about token-efficiency (though I won’t deny that either). Suppose you’re working on a mixed R/Rcpp code base, and the agent notices that something isn’t quite right: an algorithm isn’t converging like it should, there are weird values being spit back, whatever. Suppose that the problem arises in the C++ code. The number of layers that the agent has to work through is substantially bigger than if the same code is written in Julia: in Julia, the agent can essentially copy the inputs to the call that gives the problem, and then is immediately debugging at the site of trouble. In the mixed workflow, the data will come from the wrapper language and has to be passed through to the low-level language. That erects more barriers and makes it harder to introspect the code. I’m not saying the agent can’t do that—clearly it can—but by the time you have it isolated, my agent writing in Julia is already submitting a PR with the fix.

I do not think so. Consider what happened elsewhere:

Lean is pretty impractical for humans to write proofs. Formalization of mathematics is not a job that humans are good at. And yet: Since formal proofs are cheaply machine-checkable, having AI do maths is a search problem, not some intractable black magic like “translate a discourse post”. It is amenable to different training methods (RLVR, “reinforcement learning with verifiable rewards”). AI agents made formal methods much more relevant and practical!

I suspect that programming / software should aim to go down a similar path: Verified / proof-carrying code / languages were completely impractical before AI agents. But now, they become feasible.

With AI agents, who cares whether julia is 100x more efficient to write, both for humans (measured in productivity) and AI (measured in tokens) than eg ADA spark or IDRIS?

That’s a constant factor, compared to the possibility of creating secure / reliable / trustworthy / verified code, which means better scaling as the size of your software project grows. Also add the fact that training for proof-carrying code costs mere FLOPs and doesn’t require more training data (RLVR ftw! The AI labs have or will soon exhaust the entirety of written communication produced by the human species)

Alright, but would AI not make R superfluous even before Julia? If everybody can write performant C++ code directly, what is the purpose of having an intuitive programming language?

Not impossible. But having a nice system for package management and having a REPL are wins for both agents and humans. Rust has the former but not, AFAIK, the latter. C++ does not even have the former.

I don’t pretend to know which way this is going to go, but we shouldn’t assume that just because C++ is more widely used now, that means it automatically gets priority over a lesser-used language like Julia.

One could ask the other way around: what is the purpose of a non-readable programming language if an agent can write good (fast and etc) code in an intuitive and readable one?

Of course one can argue that readability is less important if no one is going to read the code, but it doesn’t have any disadvantage either. (And I think we will still be looking at code for quite a while, in scientific research - I don’t do it to generate my homepage anymore, but that’s another thing).

Related to the comment of foobar_v2, probably what should be something to look forward is to create the strict subsets of the language that add formal guarantees.

That’s a good point!

I think this matters a lot.

My personal tendency right now is to use either Rust or Julia. One of Julia’s biggest benefits for me is that it’s much more expressive (readable), especially for mathematical code. And in my area of expertise I must (!) understand the code.

However, Rust’s strict compiler and Clippy catch so many potential errors. Since prototyping in Rust has become so much easier with LLMs, the importance of the two-language problem is diminishing.

The requirements for programming languages just changed so heavily.

Would it be possible to create a macro that applies the borrow-checker rules of BorrowChecker.jl to a complete code-base? Would an agent be able to profit from that information?

In general, I would avoid falling back to older programming languages on a new project when programming language design has advanced significantly over the years. Just because LLMs can write code fast does not mean that these achievements don‘t matter.

Thanks Doug! Yes, I’ve followed your work, mostly lme4 as you mentioned (emailed you a few yeasr ago). I’m at Iowa State. I have played with MixedModels.jl in Julia but it’s been maybe 2 years now.

This is good to know and I will check your links. Thank you.

This was my main objective, to take known packages and basically alter them (to accept the A/G/H matrices we use as you indicated) and try to really maximize both speed and memory usage. As you may know, us animal breeders can have 10-15 trait models (multi-trait models) and maybe millions of animals. I think most of the really efficient packages are iteration on data (I/O on disk), not sure if you guys use these techniques or not.

Anyway, thanks, I will have to research most of what you mentioned. Hao Cheng (UC David) implemented JWAS by the way, not sure if they call MixedModels.jl or not.

Thank you, I will have to research these packages.

Thanks Tim. I think these are 3 very good reasons. I didn’t mean to imply models/harnesses wouldn’t choose julia, just that human data scientists may have less of a reason to jump to julia now. But I agree with this, Julia for me is “back on the table” because of AI and the learning curve I experienced. Now having a model be able to walk me through each topic helps a lot. I think I can get on board as I could eventually read the code myself to verify.

One issue early on was LLMs were horrible with Julia. I think last I tested they were very good so I will try a few small projects with Julia and see how CC, Codex, and Gemini CLI do. Thanks!

Thanks for your response. I did wonder how easy it was to call julia from R. I know there was a package at one point, but when I looked into it years ago it didn’t seem to work well for me. I will track this project you posted on that. I may choose to rebuild my Rcpp with julia as the backend for some core parts that need efficiency.

Julia is advantageous in scientific modeling, a central key for future developments in Agentic Safety. See this paper.

I still think the LLMs fail to write Julia as efficiently as they should. They may follow a generic pattern instead of doing things the “Julia way” which can lead to code bloat. But why wouldn’t the AI just write in C instead of C++. Or put out an intermediate reference language directly? The AI output needs to be reasoned about, verified, and understood and maintained. It still needs efficiency. Julia still has a powerful package manager so you don’t need another layer of make files and other kludges that may or may not be compatible with your current os and installation. It still is much simpler to understand and reason about without pulling in a large context. But Julia can produce a lot of output that consumes tokens when verifying code results, maybe the mcp helps but is there a standard bearer? Many times the design process starts in matlab for us. Or maybe Python. And one day Julia. Then we need to put that in something easily deployable and reusable in simulation, on a server, or in an SOC. I think the deployment can use the AI to transfer to the final domain language that meets all of the requirements for safety and efficiency. (The three language problem.) Once julia closes that gap to the end domains you could remain in Julia, but until then you would need to continue the kludge using AI to the end HLS language or browser based language you need. Maybe the Julia community has finally solved getting to .exe in recent releases. Many times julia is write out to a DLL or shared object that is called by a larger c or c++ entity for simulations. The flexibility to stay in Julia is great. Looking forward to Julia HLS options for deployment.

I’ve heard anecdotes about Gemini 4’s superior performance in fields outside of just coding. Julia seems to be more “domain” oriented than many languages, I wonder if improvements across other scientific domains in a model translates to improved Julia code?

Just to add a data point: recently this paper was released:

“Large language models as collaborators in molecular thermodynamics: a case study of the
LLM-assisted development of SAFT-VR IMP, an equation of state for polar fluids” (link) that uses almost exclusively Clapeyron.jl (a thermodynamics library in Julia)

While i recognize some of the authors, almost no interaction was done directly with the julia package developers for package guidance; after all, the paper is a demonstration of LLM capabilities, and the prompt’s transcript does not guide the LLM on any specific direction (apart from “write the code with the specifics of the package”) . Yet, the LLM used julia + Clapeyron.jl extensively: after the theoretical derivation was done, a julia file with the implementation was created, that implementation was tested, compared with existing models, and used to fit some substance parameters to experimental data, with a global optimizer (Metaheuristics.jl).

The main work is all julia, but the LLM was not restricted to use julia exclusively: For example, the LLM used python to read a .xls file and transform it into .csv. It could use python to get a global optimizer, but it didn’t, choosing a native julia library instead.

Also, while performing the work it was asked to do, the LLM found a bug in the library that was open just 1 week earlier (i doubt the authors read the github issues) and proposed the correct fix. While i know that LLM are really good at code generation and fixing, I am still pondering the fact that a bug report came from direct LLM work instead of “human assisted with LLM” work.

As tim holy said:

The last point is the most subtle, and here I’m not talking about token-efficiency (though I won’t deny that either). Suppose you’re working on a mixed R/Rcpp code base, and the agent notices that something isn’t quite right: an algorithm isn’t converging like it should, there are weird values being spit back, whatever. Suppose that the problem arises in the C++ code. The number of layers that the agent has to work through is substantially bigger than if the same code is written in Julia: in Julia, the agent can essentially copy the inputs to the call that gives the problem, and then is immediately debugging at the site of trouble. In the mixed workflow, the data will come from the wrapper language and has to be passed through to the low-level language. That erects more barriers and makes it harder to introspect the code. I’m not saying the agent can’t do that—clearly it can—but by the time you have it isolated, my agent writing in Julia is already submitting a PR with the fix.

This is exactly what happened, short of actually opening the PR.

Thanks, some good stuff in here. The more I think about it for scientific computing, we should always be able to verify source code in the era where code is cheap (therefore the exe or binary should be eliminated for science/research imo). Before AI, our field had to protect code because it was so expensive to produce a package over 5, 10, 20, 30 years+ even. But today, you can rebuild the same massive package in weeks with a team, or by yourself in < 1 year (my package has still taken since April or 6 months and still not to v1.0.0).

I also agree, I had a ton of trouble with most models coding with Julia in the past, but recently they seem to be much much better, still not sure about efficiency and all that, but I don’t run into a ton of errors any longer.

I think the main strength in the future will be token efficiency and ease of reading for us “biologists” (even if quantitative fields) when we need to verify the equations, much easier to reason with Julia code than C++ and lower level languages and optimization can still get you close to the efficiency they provide without the headache and time.

Good insight here. I have very little C++ running only the most intense calculations because most other packages called are vectorized or written in C++ themselves (I assume dbplyr for instance when I interact with duckdb). But if a large % or majority was in C++, I agree completely. Mine is only ~200 lines to take care of one nasty calculation with crossovers right now.

For the top part of your answer, seems like it has to do with a critical package that already existed in Julia and became a good choice, I think if the package ecosystem continues to develop at a rapid pace, LLMs will push Julia more on the every day vibe coder when they don’t really know what to tell the agent for a guide, usually I tell it what language I want or discuss first and then decide.

Thanks for the answer.