M
Modular7mo ago
matthew

Is Mojo a general-purpose language? Or an AI language?

I’ve been fascinated by Mojo as a language, despite not touching Python much in my career. However, I came across the recent blog post: “Mojo vs. Rust - is Mojo faster than Rust?” I think what’s off-putting about the article is that this far, Mojo hasn’t been positioned as anything like Rust. I.e. Rust has been marketed as a general-purpose language, and Mojo has been written-about as useful for a very very specific niche use case, even if that niche is popular right now. Can there be some writing on Mojo as a general-purpose language? Can you build command-line apps? Can you build web servers? Parsers? Can it compile to WASM? AI is cool but I feel like software devs (like me) who are not in that field will not be remotely interested in Mojo without demonstrations out of the field. And if the Mojo team is not interested in anyone using Mojo out of the AI space, that’s okay! I just wish that was a little more clear in the communication about it.
11 Replies
matthew
matthew7mo ago
Modular Docs - Mojo🔥 FAQ
Answers to questions we expect about Mojo.
matthew
matthew7mo ago
Still, I’d like to see more about the real-world applications outside AI
ipasaris
ipasaris7mo ago
Hey, Matthew. Mojo is, and if not yet, is destined to be a general-purpose language. It's always marketed as a superset of python which means that, like python, it'll do as much if not much more. If you're interested in seeing some cool things that have been done with it, feel free to scroll through the "community projects" and "performance and benchmarking" channels respectively. You can be sure that the Mojo team will definitely deliver on the dream they're selling 👨🏽‍💻
matthew
matthew7mo ago
Oh thanks!
sora
sora7mo ago
Mojo is a high level system programming language with unique low level capabilities (optimisations as a library, first class MLIR, etc.). These capabilities are vital for AI and high performance/heterogeneous computing use cases; but their uses are definitely not limited to those. SIMD related optimisations, for instance, can be seen in json parser libraries. It just happens that Mojo also have first class SIMD support, making it an ideal language to implement such a library. Calling it a AI language highlights the main focus of Modular, indicating the priority Modular delivers new language features. However, it says nothing about how Mojo can be used in itself, by the community. I think many people in this server don’t have an AI background, and they may just want a good system programming language, or a language with great python interop, or a safe language that is not rust, or a combination of all those things.
Melody Daniel
Melody Daniel7mo ago
I don't have an AI background. If Mojo can do things Python is capable of then it's okay for me
jmky
jmky7mo ago
But then again, Mojo also aspires to me a low level system programming language. It does not have private variables or visibility scoping. I find it difficult to reconcile how would such a low level language be effective without this feature. I guess at some point compromises have to be made between being compatible to Python and being a low level system programming language.
DanteOz
DanteOz7mo ago
Modular Docs - Mojo🔥 roadmap & sharp edges
A summary of our Mojo plans, including upcoming features and things we need to fix.
jmky
jmky7mo ago
Yes @DanteOz thank you for sharing the obvious. I had read the content in the link long ago and still don't really agree with the direction of not having private struct fields in Mojo despite being a low level language.
Melody Daniel
Melody Daniel7mo ago
what does private struct fields enable, and does C have them?
dabmlfz
dabmlfz7mo ago
I don't see how a lack of private struct fields diminish from any low-level programming. They're not related at all. One could in fact argue the opposite
Want results from more Discord servers?
Add your server