Mojo is a specialized Artificial intelligence (AI) programming language developed by Modular Inc.. First released in May 2023, is is designed to become a superset of Python, with the performance of C, unlocking unparalleled programmability of AI hardware and extensibility of AI models.
Mojo | |
---|---|
Designed by | Chris Lattner |
Developer | Modular Inc. |
First appeared | 2023 |
OS | Cross-platform |
Filename extensions | .mojo, .🔥 (the Fire Emoji / the U+1F525 Unicode Character) |
Website | https://www.modular.com/mojo |
Influenced by | |
Python |
Origin Design and development
Mojo programming language is first released internally by Modular Inc., an AI infrastructure company in California, United States [1], in September, 2022[2], with advanced compilation features powered by the MLIR, the Multi-Level Intermediate Representation compiler framework. [3][4][5].
Similarity with Python
Mojo programming language is fully compatible to the existing Python 3.x code and Project Jupyter ecosystem. Further, it also adds features that enable performant low-level programming—like “fn” for creating typed, compiled functions and “struct” for memory-optimized alternatives to classes. A struct in Mojo is similar to a Python class: they both support methods, fields, operator overloading, decorators for meta programming.
Programming examples
Hello world program:
print('Hello, world!')
References
- ^ "Modular, Inc".
- ^ "Mojo🔥 changelog".
- ^ "Mojo language marries Python and MLIR for AI development".
- ^ Lattner, Chris; Pienaar, Jacques4 (2019). "MLIR Primer: A Compiler Infrastructure for the End of Moore's Law". Retrieved 2022-09-30.
{{cite journal}}
: Cite journal requires|journal=
(help)CS1 maint: numeric names: authors list (link) - ^ Lattner, Chris; Amini, Mehdi; Bondhugula, Uday; Cohen, Albert; Davis, Andy; Pienaar, Jacques; Riddle, River; Shpeisman, Tatiana; Vasilache, Nicolas; Zinenko, Oleksandr (2020-02-29). "MLIR: A Compiler Infrastructure for the End of Moore's Law". arXiv:2002.11054 [cs.PL].