Skip to content

Macro reform #416

@glaebhoerl

Description

@glaebhoerl

At some point, possibly after 1.0, we may want to reform the macro system.

Wishlist items which come up frequently include:

  • Having macros be namespaced and scoped under modules the same way as other items are, e.g. one could write std::io::println!("hello world").
  • Full hygiene for all items mentioned in macro bodies. (Currently one must write the fully qualified path for items in macros.)
  • The ability for macros to refer to private items visible at their definition site, allowing them to be a tool for abstraction, not just convenience.

(The latter two might potentially be accomplished by having all name resolution in macro_rules! bodies happen at the definition site. This article may also be of interest.)

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