r/programming • • Aug 18 '26

Modular: Mojo🔥 is now open source!

https://www.modular.com/blog/mojo-open-source
0 Upvotes

44 comments sorted by

View all comments

Show parent comment

4

u/Solonotix Aug 19 '26

I think the problem is that Python performance doesn't come from the language, but instead from low-level implementations that are published as libraries for use. In other words, you cannot write truly performant Python code without reaching for a different language. That was the specific niche Mojo originally pitched.

As for the ergonomics of Rust, that is a little harder for me to be certain of (since I only have hobby experience with the language). My experience and awareness of common criticisms says that Rust becomes a nightmare to manage the moment you add the async keyword. I think there's a lot you can do with single-threaded Rust, and even the thread primitives like one-way Channel messaging is sufficient for the majority of use cases. Anything that needs to rely on async-await, though, I would probably recommend Go before Rust.

Again, I don't daily-drive Rust, so maybe the situation has improved. I know that the honeymoon period of "Just use tokio to manage async" has passed, once everyone realized that making all async data have a lifetime of 'static was how Tokio made it so easy.

1

u/stumpychubbins Aug 19 '26

`async` interacts poorly with the type system, that’s mostly where the reputation of it being a nightmare comes from. It becomes difficult to correctly annotate types for generic async code quite quickly, which in turn means that not many libraries (e.g file format serialisation/deserialisation, parser combinators) support it, not to mention that most of the biggest production-grade libraries predate async and would have to be rewritten to support it.

1

u/unski_ukuli Aug 19 '26

As someone who has sunk a lot of time in Rust, I’d say its not super ergonomic. I don’t write async code, so i’m not even talking about that. It is ergonomic as long as your application stays small, like some cli utility, but as soon as you start making a library with a lot of types, it gets super messy if you try to stay generic and use lifetimes. Of course, a lot of that come from lifetimes being hard eith or without explicitly declaring them, but sometimes you can better reason about them than the compiler can deduce itself.