News for hackers. Stuff that matters.
Re:Hard Rust requirements from May onward for all Debian ports by kstrauser on Saturday November 01, 2025 @12:29PM (#45782979)
I think the Rust example’s biggest readability sin is using the full names of things like foo::bar::Baz instead of just Baz, but I get why they did that. When you import a lot of things into a file the latter way, it’s easy to get lost in “was that a foo Baz or a wiz Baz?” Sometimes it’s easier just to use the long names everywhere to be explicit.

If I wanted to tweak the Rust project, I’d feel pretty confident I was calling the right things with the right params.

Re:Hard Rust requirements from May onward for all Debian ports by cogman10 on Saturday November 01, 2025 @12:37PM (#45783061)
That's a style choice that I think comes from former C++ devs.

Java can potentially have the same problem. But because everyone uses an IDE and because it's rarely really an issue, everyone will simply import `Baz` rather than worry about the Foo::Baz and Bat::Baz collision. It does happen in java code, but I can't stress how infrequently it's actually a problem.

Re:Hard Rust requirements from May onward for all Debian ports by kstrauser on Saturday November 01, 2025 @12:42PM (#45783109)
I don’t think that’s quite right. I haven’t written C++ since the 90s, and I use IDEs (Emacs and Zed), but I still sometimes reach a mental threshold where I look at my screen and see way too many names to have to hold in my mental buffer, then decide to make them more explicit.
Re:Hard Rust requirements from May onward for all Debian ports by cogman10 on Saturday November 01, 2025 @12:51PM (#45783177)
IDK what the state of Emac/Zed is in terms of type information (I'm sure it depends on the language in question). For Jetbrains/Eclipse/Netbeans if there's a question about a type you can ctrl+click on the type and immediately pull all information about it.

In java, I rarely pay attention to the `import` section (and I know most devs at my company).

You can look up `using namespace std;` in google and you'll find a lot of articles saying it's a bad practice in C++. Everyone recommends writing the full `std::cout` rather than `cout`.

Re:Hard Rust requirements from May onward for all Debian ports by kstrauser on Saturday November 01, 2025 @12:55PM (#45783221)
All modern editors do that pretty well with language servers now. Specifically, Emacs and Zed do this perfectly with Rust.

I do think it’s down to personal preference. With the fully qualified names, I can look at the screen and follow the flow without having to mouse over the various names in play. For that matter, I could print it out if I wanted to and still have all the information.

I don’t think you’re objectively wrong. It’s more that we have different approaches to managing the complexity when it gets hairy.

Re:Hard Rust requirements from May onward for all Debian ports by combyn8tor on Saturday November 01, 2025 @05:01PM (#45785311)
I just import them with unique names if there is a collision - Wiz_Baz and Foo_Baz