Login
You're viewing the code4lib.social public feed.
  • Nov 25, 2026, 10:49 PM

    Since I'm building the new apt-core library separate from the legacy apt-pkg code (arguably half of it is gonna be old internals of FileFd refactored but still) I'm thinking of taking the step to make this a modern library.

    - indent with tabs instead of 3 spaces/8 tabs
    - use snake_case instead of PascalCase (and camelCase functions in recent years)

    And statically enforce these with clang-format and clang-tidy.

    Anyone has opinions

    💬 2🔄 0⭐ 0

Replies

  • 💬 1🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • Nov 26, 2026, 2:19 AM

    @juliank I find tabs a bit more annoying to work with when formatting, but tbh, as long as it's consistent, whatever floats your boat is fine. Same for snake_case, as long as it's consistent, it doesn't matter (and the stdlib is snake_case, so there is a point for it!). +1 for clang-format + clang-tidy (+ clazy), they save a ton of time!

    💬 0🔄 0⭐ 0