Skip to content

Commit 62eb890

Browse files
committed
Remove macro hygiene from hello world slide
1 parent 63e50a8 commit 62eb890

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/types-and-values/hello-world.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ What you see:
1919
- The `main` function is the entry point of the program.
2020
- Blocks are delimited by curly braces like in C and C++.
2121
- Statements end with `;`.
22-
- Rust has hygienic macros, `println!` is an example of this.
22+
- `println` is a macro, indicated by the `!` in the invocation.
2323
- Rust strings are UTF-8 encoded and can contain any Unicode character.
2424

2525
<details>
@@ -37,9 +37,9 @@ Key points:
3737
- Rust uses macros for situations where you want to have a variable number of
3838
arguments (no function [overloading](../control-flow-basics/functions.md)).
3939

40-
- Macros being 'hygienic' means they don't accidentally capture identifiers from
41-
the scope they are used in. Rust macros are actually only
42-
[partially hygienic](https://veykril.github.io/tlborm/decl-macros/minutiae/hygiene.html).
40+
- `println!` is a macro because it needs to handle an arbitrary number of
41+
arguments based on the format string, which can't be done with a regular
42+
function. Otherwise it can be treated like a regular function.
4343

4444
- Rust is multi-paradigm. For example, it has powerful
4545
[object-oriented programming features](https://doc.rust-lang.org/book/ch17-00-oop.html),

0 commit comments

Comments
 (0)