On Thu, 12 Oct 2017 15:21:14 +0100 Matthew Parnell <m...@parnmatt.co.uk> wrote:
Hey Matthew, > Afternoon suckless community. > > It is made clear in the suckless coding style guide when to use > #define and enums; however, it doesn't mention general global > constants. as a general rule of thumb I think it's valid to try to reduce the usage of the CPP as much as possible. It's a powerful tool, but for defines like this, something might get lost. After all, if you compile your code with debug flags, you won't be able to trace back the constant "FOO", it will just be a literal to the debugger. Using it as a "static const" variable, the debugger will be able to "see" it, providing more context. Apart from that though, in my opinion, such defines are a misuse of the CPP in most cases. With best regards Laslo Hunhold -- Laslo Hunhold <d...@frign.de>