Skip to content

Guide: explain why things like println! and vec! are macros in Rust #17190

Closed
@kud1ing

Description

@kud1ing

Many C/C++-people will wonder why in Rust macros are used for such simple tasks as printing and building a vector, while macros in C/C++ are mostly used for complex/advanced stuff.

Something like in Rust this is a macro because ... or you could use the following Rust functions directly, but calling the macro is easier because ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions