4 ms·
> For Rust, a file foo.rs only exists semantically if some parent file includes it via mod foo; declaration! And, in general, it’s impossible to locate the pare
by le-mark 3y ago
> For Rust, a file foo.rs only exists semantically if some parent file includes it via mod foo; declaration! And, in general, it’s impossible to locate the parent file automatically. Usually, for src/bar/foo.rs the parent would be src/bar.rs, but, due to #[path] attributes which override this default, this might not be true.
This is where the path based package structure of Java/c# was a huge win from a static analysis perspective.
- jen20 3y agoC# does not have a path-based structure.