2 ms·
Every file is an implicit struct, so importing a module is just importing a struct with static members. You can also do something like: ```Point.zig x: i32, y
by fallow64 1y ago
Every file is an implicit struct, so importing a module is just importing a struct with static members.
You can also do something like:
```Point.zig
x: i32,
y: i32,
const Self = @This();
fn add(self: Self, other: Self) Self {
// ...
}
```
- pjmlp 1y agoYeah, which is basically how requires() kind of works.