2 ms·
Hm, in docs they say that dependent type system is not first class seems. Is it even dependent? More like refinement types, which seems will be in Rust too.Als
by dlahoda 2mo ago
Hm, in docs they say that dependent type system is not first class seems.
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.
- Archit3ch 2mo ago> But compared with Python, Julia, Matlab, R, Rust, C, C++ - Mojo feel relief for working with numerics. Out of those, Julia is the only one that combines Multiple Dispatch and native code, both important for numerics.
- jondea 2mo agoI don't agree at all with your last paragraph. MATLAB and Julia are lovely for numerics, maths is terse and looks like maths! Mojo is hobbled by choosing Python style syntax, which does not lend itself well to maths. 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.
- ainch 2mo agoWhat problems do you run into for maths with Python? For linear algebra and ML with Jax/Numpy I find it quite readable.
- jondea 2mo agoI think problems is too strong a word, it's just how the syntax looks. And of course it's far better than say C++. But specifically, the lack of native vectors/matrices and very few infix operators (e.g dot product, and matrix multiplication with @ is clunky). Explicit but generic broadcasting using `.` also helps. 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.
- dlahoda 2mo agoI coded Matlab in uni, never got it. And had to look Julia code. I have to learn it to read. I am more SEng rather then Sci or Quant. And on compile time types. So for me Julia is foreign and forces me to look both Python and Julia.