sway
sway copied to clipboard
Namespace separation in files similar to `mod` in Rust
It would be nice to do
use interface::{abi::ConnectFour, events::{DrawEvent, MoveEvent, WinnerEvent}};
instead of
use interface::{ConnectFour, DrawEvent, MoveEvent, WinnerEvent};
and the file would look like
library interface;
// can't use abi because it's a keyword but this is an example
pub mod abi {
pub abi ConnectFour {
// Code
}
}
pub mod events {
pub struct DrawEvent { ... }
pub struct MoveEvent { ... }
}