The previous naming introduced a "enable_diagnostics" feature flag onto projects. Firstly, a feature flag existing is to enable it, so to say "enable_anything" is redundant. Secondly, the flag controls one precise behavior, the printing of allocator queries, not a catch-all omnibus diagnostic-mode. I don't think the intention was to construct such a device, so name things more specifically and drop `enable_`. I do pivot between `allocator_diagnostics` in global context (e.g. project feature flag name) and simply `diagnostics` in the allocator code context (e.g. the `Request` struct) to avoid repetition, though the complication to grepping all uses of the symbol may counter-indicate it: now a more complicated search pattern will be required to see how it correlates through the entire program. I am ambivalent about my choice here, if later someone wishes to make it correlate.
8.2 KiB
8.2 KiB