From 85a8b92b5143307d7e2f625930eb7d179d2c1213 Mon Sep 17 00:00:00 2001 From: Steve Klabnik <steve@steveklabnik.com> Date: Thu, 2 Oct 2014 15:12:27 -0400 Subject: [PATCH] extra comment about macros Fixes #17190 --- src/doc/guide.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/doc/guide.md b/src/doc/guide.md index 074dfc17b0d..fa0cbb547e0 100644 --- a/src/doc/guide.md +++ b/src/doc/guide.md @@ -195,9 +195,11 @@ The second point is the `println!()` part. This is calling a Rust **macro**, which is how metaprogramming is done in Rust. If it were a function instead, it would look like this: `println()`. For our purposes, we don't need to worry about this difference. Just know that sometimes, you'll see a `!`, and that -means that you're calling a macro instead of a normal function. One last thing -to mention: Rust's macros are significantly different than C macros, if you've -used those. Don't be scared of using macros. We'll get to the details +means that you're calling a macro instead of a normal function. Rust implements +`println!` as a macro rather than a function for good reasons, but that's a +very advanced topic. You'll learn more when we talk about macros later. One +last thing to mention: Rust's macros are significantly different than C macros, +if you've used those. Don't be scared of using macros. We'll get to the details eventually, you'll just have to trust us for now. Next, `"Hello, world!"` is a **string**. Strings are a surprisingly complicated