4 ms·
That is a great world. But considering that we still do not really know how to write e.g. generic code that operates on both immutable and mutable arrays, I thi
by gugagore 5y ago
That is a great world. But considering that we still do not really know how to write e.g. generic code that operates on both immutable and mutable arrays, I think Julia is not there yet.
The other big thing missing in Julia that is IMO important here is more control over evaluation, like allowing lazy evaluation. You can build some of these features on top of Julia (e.g. https://github.com/RelationalAI-oss/Salsa.jl https://github.com/RelationalAI-oss/Salsa.jl).
Math is usually not written with computation in mind, so some algorithm might e.g. re-evaluate f(x) multiple times. Compiler optimizations can help in some cases, as can a "dynamic" solution like memoization/caching. But again, I don't think Julia is "there" yet.
- StefanKarpinski 5y agoI don’t really get the first issue. If an algorithm doesn’t need to mutate a matrix then it will work for a mutable or immutable matrix. If it needs to mutate a matrix then how could it work for an immutable matrix? If you want a polyalgorithm that uses a mutating algorithm on mutable matrices and a non-mutating algorithm on immutable matrices, then you can just do that (and multiple dispatch makes it easy). What additional features are needed? Is there some language that “does this right”?