77 points · by darboux · 1y ago · 14 comments
Honestly, I'd write Rust. Or write Julia. Whatever one you want.
Kudos on the project though, looks like it was fun to make. Who knows maybe it will evolve into something else that makes more sense to me?
For debugging after an issue is found this is maybe helpful though.
Exactly this: https://discourse.julialang.org/t/package-for-rust-like-borr...
> I guess I’ll just add my motivation – I’ve had to debug multiple race conditions in [SymbolicRegression.jl](https://juliaregistries.github.io/General/packages/redirect_...) which nowadays is quite a complex library with deep call stacks, a lot of memory optimizations, asynchronous stuff, buffers, etc. Every race condition is an absolute pain to debug
As a Julia user myself sometime I missed a borrow checker, and destructive move
I'd heavily consider abstracting out whatever logic was possible into Rust and FFI'ing into Julia. Seems like some Python, and otherwise projects have started going in this direction and I haven't heard any complaints. Usually performance benefits and cleaner code.
I don't do much of science compute, but I would imagine correctness and stability really matters for end users. Unless its kind of a nichey write a paper and run sort of thing. Then whatever.
From the same discourse thread.
Interoperability across languages with FFI is an option, but it comes at a cost. Even if the two languages have polymorphism, e.g. with parametric types, the interfaces are almost always monomorphic.
Like, one of the advantages of Julia over Rust is that GC languages are way easier to write code in. With a borrowchecker, you get a fat runtime and the cost of garbage collection with none of the convenience
I find the borrowchecker with its checking of mutable references can really assist you well in writing correct code more easily. Especially when it comes to parallelism. But also in not accidentally mutating something that some other function still holds a reference to.
So I wouldn't say the borrow checkers utility is limited to checking allocation scopes.
This also seems to be the motivation according to the readme.