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)
you are viewing a single comment's thread
view the rest of the comments
[–] 4 points 21 hours ago* (2 children)

I'm most used to c style and as a result I like it because it's simple and uncomplicated. I recently started learning rust and quite like their way of doing it, although there's also mod and I haven't quite figured out when to use which. I just do what rust analyser tells me :)

  • source
  • hideshow 2 child comments