Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
module proposals from a birds-eye view

Proposals

  • TODO: internals threads

  • [Automatically Usable External Crates – cramertj]

    • TODO
  • TODO: more internals threads

  • TODO: where was that initial proposal for automodules?

    • (IIRC it defaulted to pub for directories?)
    • (wasn't this niko?)
  • TODO: more internals threads

  • TODO: even more internals threads

  • RFC for module redesign – withoutboats, aturon

    • Notable properties
      • No extern crate.
      • Has automodules
        • default crate-visible, period.
        • <<vis>> mod x; for configuration
        • #![ignore] in module, or #![ignore(submodule)] in parent
      • Unambiguous paths for use and names in scope:
        • addresses root/non-root differences
        • new heirarchy
          • absolute: use crate::path::Item;, crate::path::Item
          • relative: use self::path::Item;, self::path::Item, path::Item
          • external: use std::path::Item;, ::std::path::Item
      • New keyword export
        • replaces pub use
        • also a visibility modifier (today's pub(crate))
    • Advantages/Problems solved
      • TODO: Make entries under "Problems with modules today" and link to them here
    • Disadvantages/Problems not solved
      • TODO
  • Modules – withoutboats

    • Notable properties
      • No extern crate.
      • Has automodules
        • default crate-visible, period.
        • <<vis>> mod x; for configuration
        • explicit support for #[cfg(something)] mod foo;
        • #[ignore] mod submodule;
      • New keywords: export, local
      • Unambiguous paths for use and names in scope:
        • addresses root/non-root differences
        • new heirarchy
          • absolute: use local::path::Item;, local::path::Item
          • relative: use self::path::Item;, self::path::Item, path::Item
          • external: use std::path::Item;, ::std::path::Item
      • import/export distinction
        • use absolute::path::Item; (for importing; not an item)
        • <<vis>> export relative::path::Item; (item-like)
      • Reworked visibility modifiers:
        • local <<item>>: today's pub(crate)
        • local(path) <<item>>: today's pub(path)
        • pub <<item>>: today's pub
    • Advantages/Problems solved
      • TODO
    • Disadvantages/Problems not solved
      • TODO

Problems with modules today

TODO: can have elaborated descriptions of problems here, and link to them from above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment