Mojo (programming language)

This is an old revision of this page, as edited by Ddmmyyy8 (talk | contribs) at 07:35, 5 May 2023 (Similarity with Python). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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 byChris Lattner
DeveloperModular Inc.
First appeared2023; 2 years ago (2023)
OSCross-platform
Filename extensions.mojo, .🔥 (the Fire Emoji / the U+1F525 Unicode Character)
Websitehttps://www.modular.com/mojo
Influenced by
Python

Design

Mojo programming language is designed by Modular Inc., an AI infrastructure company in California, United States [1], with advanced compilation features powered by the MLIR, the Multi-Level Intermediate Representation compiler framework. [2][3][4].

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

  1. ^ "Modular, Inc".
  2. ^ "Mojo language marries Python and MLIR for AI development".
  3. ^ 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)
  4. ^ 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].

See also