Today, Mojo SDK is officially launched by Modular Team. So, Today I going to make a cheat sheet for you!
var x = 1
var x: Int = 1
let x = 1
fn greet(): print("🔥🔥")
struct MyPair: var first: Int var second: Int fn __init__(inout self, first: Int, second: Int): self.first = first self.second = second fn dump(self): print(self.first, self.second)
from python import Python let np = Python.import_module("numpy") ar = np.arange(15).reshape(3, 5) print(ar) print(ar.shape)
This cheat sheet covers the basics of Mojo and I do know this is short but Mojo has a lot of complex concepts related to memory management, copyinit, ownership and borrow checking. As of today, Mojo is early in development and released recently. So, I like this Mutli-threaded language and its memory management is similar to Rust. It does not many features of Python like anynomynous functions with