rust-lang / reference

The Rust Reference
https://doc.rust-lang.org/nightly/reference/
Apache License 2.0
1.22k stars 474 forks source link

rename "Macros By Example" section to "Declarative Macros" #1515

Open lolbinarycat opened 2 months ago

lolbinarycat commented 2 months ago

this terminology is rarely used outside of the reference, and is fairly confusing. it is especially easy to confuse this page for the rust by example page on macros.

proposed changes:

0elek commented 2 months ago

"Macros By Example" is not just the name of the section but the type of macros that the macro_rules! produce. i don't think this need changing since its being explained in the first line.

lolbinarycat commented 2 months ago

"Macros By Example" is not just the name of the section but the type of macros that the macro_rules! produce.

yes, i understand that, but that type of macro is much more commonly referred to as "declarative macros". "Macros By Example" is a confusing name, which is why most information on rust does not use it.

i don't think this need changing since its being explained in the first line.

just because something is explained in the reference doesn't mean it isn't confusing. the terminology in the reference should match that used by the rest of the community, and that is not the case here.