Hacker News new | ask | show | jobs
by satvikpendem 932 days ago
But again, why though? Why would someone writing custom compute kernels do it in some closed source language that just recently released instead of a language like Rust that has much more momentum behind it as well as similar safety guarantees? If Mojo was fully compatible with Python and simply sped up the code, then it's understandable why one would use it, as indeed that's what I thought they were doing (being akin to TypeScript, ie improving the base language in compatible ways that aren't so different as is the case here with borrow semantics), but it seems like they're pivoting out of data scientists.

And again, if in the future one can write higher level code (which is also possible in Rust via simply ignoring borrow semantics and cloning everywhere, where you still end up with a much faster program than in, say, TypeScript or Python simply due to the compiled and lack of GC nature of Rust), as well as higher level APIs on top of low level routines, how is that any different than Python which already has C++ implementations for popular libraries underneath their Python APIs?

It seems like Mojo doesn't really know what kind of language it wants to be and is throwing features at the wall.

2 comments

I think the killer feature of Mojo is that it's basically syntax sugar for MLIR, which is a new "mid level IR" for the LLVM project, and many 'dialects' have been added that can target specialized transformations for machine learning workloads and data structures. It's the secret sauce that Rust doesn't have.

In their early roadmap they said they wanted to take ideas from swift and rust (and C++), and this is just one part of it. They'd been planning on adding Traits eventually, they're just getting there carefully.

Knowing Lattner's previous work, I'm confident Mojo will eventually be open source, they've just said they want to get it right first, which I can respect. But If you compare Mojo with other new 'systems-level' languages like Carbon and Hylo, the Mojo team is basically speed running language development, which is really impressive. I think a big part of what makes that possible is that they're building directly on top of MLIR.

They go into more of the motivations in this LLVM Dev Mtg talk https://www.youtube.com/watch?v=SEwTjZvy8vw