[neomutt-devel] About C flavour (Was: Refactoring's cosmetics ?)

Guyzmo z+mutt+neomutt at m0g.net
Thu Jan 26 14:55:42 CET 2017


On Thu, Jan 26, 2017 at 02:13:59PM +0100, Pietro Cerutti wrote:
> On 2017-Jan-26, 13:26, guyzmo wrote:
> > I'm not saying we absolutely *shall* enforce C11, but I wouldn't want to
> > refuse to use a feature that would benefit neomutt because we've made an
> > executive decision to stick with C99.
> 
> The are a strong reason for this "executive" decision: upstream isn't
> going to adopt any C11 code we might write. This should be enough to
> settle the debate (for the time being).

let's agree on dis… nah, just kidding ^^

I don't think we should factor how upstream's working here. As we're
discussing refactoring in those threads, I think we shall consider that
neomutt is more than just a mutt+patches, but rather a rework of what it
is.

> I honestly do not think that our developing experience and productivity
> would boost by the couple of C11 features we would take advantage from.

Well, I see four things that could be nice to use:

- static asserts
- anonymous struct/union
- fopen lock thing
- unicode features

Anyway, it looks like I'm the only one really suggesting to stay open
for C11 features usage, so I won't try to push much more the topic.

→ Anybody else agree with my position on keeping an open mind with C11?

What *REALLY* matters to me, though, is to be ok with full support of
C99, that means using:

 - `#pragma once`,
 - single line `//` comments,
 - stdbool/stdint, 
 - variable and flexible arrays,
 - designated initialisers or
 - struct literals…

→ Everybody agrees that we can, and should, use the most of C99
  features, to make new code elegant?

(of course, about C99 features, don't fix it if it ain't broken, only
introduce them in or around new code)

Cheers,

-- 
Guyzmo


More information about the neomutt-devel mailing list