I would think you could implement those 200 lines also in Julia with (or without!) AI. And you can already call Julia from R; and with this package it will likely get easier as it already has for Python to call Julia:
R is likely next, and AI has been helping greatly recently in the Julia ecosystem as with the MATLAB support (and at JuliaLang and elsewhere), here with 45 commits across 30 files:
I still think Julia is the better language for, and if you’re language agnostic, you might be able to move everything to Julia. AI can probably already do it as has been shown in other cases (in one recent case of large codebase translation by AI for C++ to Julia resulted in 6x speedup):
Now it’s a question of which is the best language.
Depending on exactly what you’re doing this might apply:
Same AI model, different results: Dyad Agent scored 0.899 versus Claude Code’s 0.533 across four physics problems, at similar cost and runtime.
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.