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)
  • mesa@piefed.social
    link
    fedilink
    English
    arrow-up
    2
    ·
    3 days ago

    Its s nothing burger so its very good.

    What I don’t like is doing it 100 times to pull in a main.py but there’s ways of getting around it. Its not the languages fault but its kinda what everyone does.