From 23e60ea2a1fbdacd9316cbbc31674966365f70c5 Mon Sep 17 00:00:00 2001 From: Cheukting Date: Sat, 20 Apr 2024 12:45:21 +0100 Subject: [PATCH] Fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 01d7843..cba2dfb 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ On the other hand, Rust code needs to be compiled. So before you run your progra In Rust, we have crates. [From the Rust Book](https://doc.rust-lang.org/book/ch07-01-packages-and-crates.html): "A crate is the smallest amount of code that the Rust compiler considers at a time.". For simplicity sake, let's think of a similar counterpart in Python. It is like a single .py file. Although since Python and Rust is so different it works very differently, but for the structure in your code, you may say it is the "Python equivalent" for now. -### Marco +### Macros "Fundamentally, macros are a way of writing code that writes other code, which is known as metaprogramming." ([see here](https://doc.rust-lang.org/book/ch19-06-macros.html)). In my own word, it is a meta way to plug-in in reusable code. Instead of function, which is called during run time, macros are considered during the compilation. In Rust, there are 2 types of marcos and we will come across them shortly.