Re:Mojo changelog: Traits have arrived!
by kjhabkdjhaf on Tuesday December 05, 2023 @11:09AM
(#38532706)
They go into more of the motivations in this LLVM Dev Mtg talk https://www.youtube.com/watch?v=SEwTjZvy8vw
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.
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.