Statements (23)
Predicate | Object |
---|---|
gptkbp:instanceOf |
gptkb:programming_language
|
gptkbp:canExpandTo |
Arbitrary Rust code
|
gptkbp:category |
Compile-time feature
|
gptkbp:documentation |
https://doc.rust-lang.org/reference/macros.html
|
gptkbp:enables |
Code generation
|
gptkbp:example |
assert!
println! vec! |
gptkbp:hasSyntax |
#[proc_macro]
macro_rules! |
https://www.w3.org/2000/01/rdf-schema#label |
Rust macros
|
gptkbp:introducedIn |
Rust 1.0
|
gptkbp:limitation |
Difficult debugging
Complex error messages |
gptkbp:purpose |
Metaprogramming
|
gptkbp:type |
Declarative macros
Procedural macros |
gptkbp:usedFor |
Code repetition
Domain-specific languages Reducing boilerplate |
gptkbp:usedIn |
gptkb:Rust_(programming_language)
|
gptkbp:bfsParent |
gptkb:Macro_System
|
gptkbp:bfsLayer |
7
|