Re: [dev] [general][discussion] constants: `#define` or `static const`

2017-10-13 Thread Alex Pilon
On Fri, Oct 13, 2017 at 10:29:41AM +, sylvain.bertr...@gmail.com wrote: > I would go #define and not direct "static const". > > Because I think "const" is part of the excess syntax of C and should be > optional (and treated as an optional variable attribute). You really don't think we should e

Re: [dev] [general][discussion] constants: `#define` or `static const`

2017-10-13 Thread Mattias Andrée
On Thu, 12 Oct 2017 15:21:14 +0100 Matthew Parnell wrote: > 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. > > I would search through the mailing list to see if this h

Re: [dev] [general][discussion] constants: `#define` or `static const`

2017-10-13 Thread sylvain . bertrand
Hi, I would go #define and not direct "static const". Because I think "const" is part of the excess syntax of C and should be optional (and treated as an optional variable attribute). Then I would add simple macros than would, based on the compiler, enable the attribute or not. It's a bit what's