• 𝒍𝒆𝒎𝒂𝒏𝒏@lemmy.dbzer0.com
    cake
    link
    fedilink
    arrow-up
    10
    arrow-down
    1
    ·
    1 year ago

    Edit: Except google’s style guide

    This legit made me laugh lol, Google’s style guides for their longer standing languages are always dismissed, especially their one for C++

    • christophski@feddit.uk
      link
      fedilink
      English
      arrow-up
      6
      ·
      1 year ago

      Not sure if they still do it, but Google’s python code is some of the ugliest python I’ve seen and uses 2-space indentation.

      • 𝒍𝒆𝒎𝒂𝒏𝒏@lemmy.dbzer0.com
        cake
        link
        fedilink
        arrow-up
        5
        ·
        1 year ago

        To summarize the explanations i’ve come across: It’s tailored to Google’s internal teams maintaining tons of legacy C++ code, doesn’t cover exception handling, and generally has outdated advice best suited for the code they developed in that time period. While their style guide is ideal for maintaining consistency with Google’s existing codebase, someone working on a modern C++ project should consider using the language’s more modern features and STL components

        Something I’d want to note though, someone developing in C++ for an embedded platform or even working on hardware drivers would probably have very lean and mean code which doesn’t conform to a particular style guide, especially ones advising against use of “unsafe” operations.