by totalperspectiv · 3mo ago · 0 comments
(copying from some previous Mojo threads) It's got an ownership system adjacent to Rust, comptime similar to Zig, and a first class dependent type system. Even more exciting, is that uses LLVM (to the best of my understanding) in some novel ways and for more optimizations.
Is it even dependent? More like refinement types, which seems will be in Rust too.Also HN recently mentioned Rust building similar llvm based integration with GPU.
But compared with Python, Julia, Matlab, R, Rust, C, C++ - Mojo feel relief for working with numerics.
WRT the type system, I agree MATLAB is a mess but Julia's multiple dispatch feels more like maths than any other language I've tried.
The way that types interact with methods _feels_ like maths. I.e. you have a method made up of mathematical operators, if you swap out an input, it typically does the natural and correct thing.
Out of those, Julia is the only one that combines Multiple Dispatch and native code, both important for numerics.