Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> It's not only JS/TS. Python, Go, Rust

Rust allows you to move modules around without you changing using.



When you write 'mod foo;' in a Rust file (say, main.rs), Rust will look for the source code for the module named foo in one of two places: a file named foo.rs in the same directory as the file declaring the module, or a folder named foo/ with a file named mod.rs inside it.

That's great. Something like this is what C# can also aim for, while retaining full backward compatibility.


This would break every codebase in C# where a file lives in a folder where it is NOT in sync with the file system.


This can be opt in, and not break any existing code.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: