Julia is a great language, but to be honest, I can’t say it’s ideal either. I love the language, but to not be able to criticize it is not a healthy love. It’s like Julia has been optimizing for things people say they care about and measure first, while issues that they didn’t know they cared about get sacrificed in the process.
Scope independence
One of my strongest objections is scope dependency. For example, closures actually allow you to write a pseudo-OOP. The Emergent Features of JuliaLang: Part I · Invenia Blog
Another issue is that if you do some mad stuff, for example, using eval inside macros and so on, the module is not a clean namespace. You cannot safely say that
module A
function/macro f()
...
end
end
A.f()/@A.f
is equivalent to declaring function/macro f and then using it in every case. Modules are supposed to be namespaces, but they aren’t clean namespaces.
GC issues
Julia has GC, so it is a memory-safe language, right? Nope. There are a bunch of "unsafe"s that can do something nasty. There is also the issue of compiled code not being GC-ed ever. And yes, the unsafe is indeed used to reinterpret an array in a performant way, which is itself used in order to store type stable “raw bytes”. This is useful, for example, in implementing efficient runtime virtual functions.
Development shenanigans
It is said that in Julia, it is relatively easy to contribute back to the language itself because the language itself is mostly in Julia right? Except… well, developments can and do involve wrangling with unsafe, dealing with undocumented features, etc. There are also many popular packages that use internal, undocumented features.
I thought the Julia compiler was just a thin wrapper that specialized all the functions, did some optimizations, and then passed the function into LLVM, while the lowest calls of the functions are themselves LLVM (for example, x+y eventually is an add instruction or something along the line). Except… shenanigans!
I thought the language was pristine, beautiful, and clean, but the truth is, it’s messy and there are dragons everywhere.
How did we get here?