nix icon indicating copy to clipboard operation
nix copied to clipboard

refactor(treewide): modern C++ idioms

Open lovesegfault opened this issue 1 month ago • 2 comments

Motivation

This is a tracking PR for my work around C++ modernization. It should not be reviewed, changes will be fished out into individual PRs.

Context


Add :+1: to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

lovesegfault avatar Nov 26 '25 18:11 lovesegfault

Some of these are unnecessarily code-churny with little benefit (especially the enum stuff, i.e. lvlError -> Verbosity::Error, tInt -> InternalType::Int). The merge conflicts they cause with open PRs/branches (441+) negate any potential benefit.

edolstra avatar Nov 26 '25 19:11 edolstra

I do like using enum struct because the standard allows less verbose switch than regular enums (no need for default always, I think?), and also far fewer implicit conversations.

I don't really think the merge conflict argument against churn holds water anymore because the LLMs will cruise through trivial merge conflicts from changes like that l.

Ericson2314 avatar Nov 26 '25 20:11 Ericson2314