On Fri, Oct 13, 2017 at 07:57:16PM -0400, Alex Pilon wrote: > On Fri, Oct 13, 2017 at 10:29:41AM +0000, 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 enforce preventing people from doing stupid > things? Might not matter *as much* without concurrency, and it's only > compile-time rather than run-time meaningful for non-stack variables due to > most processors' memory model. > > But it's unfortunately still useful to prevent people from doing stupid > things. > > I just wouldn't expect people to const everything that can or should be.
I expect coders to avoid the use of const keyword. I'm ready to take the risk to remove this from the code, because its addition to the syntax does not balance with the benefits of interface definition hardening, which directly leads to intellectual masturbation which is more harmful than fixing what you call "stupid things" over time. Like "enum" or "typedef", all that should not be in C, as more than one loop keyword. But this is off-topic. -- Sylvain