There are a few I’m aware of:

  1. Rust-style use (multiple imports per statement, renaming items using as)
  2. Java-style import (single import per statement, no renaming (afaik))
  3. Zig-style let xlib = @import("xlib") (imports as assignments)
  4. C-style #include (no importing, just pastes the code of the named file)
  • Traister101@lemmy.today
    link
    fedilink
    arrow-up
    1
    ·
    23 days ago

    Java doesnt have aliases. You can do glob imports of a particular package (IE all the classes) and you can statically glob import all the static functions in a class but uh yeah that’s it