Join the discussion

Write your take first — we'll ask for email only when you're ready to publish.

  • Hacker News
  • At this point, is anybody writing new C or C++? It seems like they are sunset languages even at the big corps.
  • I really appreciate that they distinguish between library code and application code. Rust gets too much of a bad rap for its complicated generic code, but in most application scenarios you are not writing code nearly that complex or generic.
  • Much of this is very standard across the Rust ecosystem but it's very helpful to have it all in one place.
  • > Don’t use async / .await in Chromium.

    That's pretty direct. IIRC, the Rust for Linux people also have that refrain informally

  • Here's a tip most Rust users don't know about extension traits: if you put `#[rust_analyzer::prefer_underscore_import]` above your trait (and you're using rust-analyzer and not RustRover), autocompletion and the import assist will import the trait `as _` by default, which is very useful for extension traits.
  • This is nice, I have been lurking on google and meta rust projects, mimicking and picking style by prompting LLMs to distill it, taking a look at fmt & clippy configs helps too.

    But it wasn't as coherent and reliable from project to project like this guide. Kudos to google on this one !

  • > Type names should be imported and used unqualified

    This just pushes people to have redundant information in types (`IoError` instead of `io::Error`).

    Unless a type is widely recognized (like `HashMap`), I prefer to have them fully qualified so I have the contextual meaning for it. If I am working with a generic name like `Source`, what does that mean? I shouldn't have to look up in the imports to understand the code (or only understand it through an LSP).

    Reducing imports also reduces unnecessary merge conflicts.

  • Can anyone expand on the chromium specifc guidelines on super tiny crates, particularly no nesting of modules/source files?

    That feels like the ~2010 era of people saying that functions should be as small as possible. That lead me to reviewing a lot of code where every function was one or two lines and you couldn't actually see what was going on anymore through the layers of unneeded abstraction.

    I want to give chrome the benefit of the doubt, but that seems really goofy.

Explore Birbla archives