We, freeciv developers, should be aware of newish C11 standard. Not
that we could start using C11 features in a long time - we depend on
only some C99 features currently so that freeciv can be compiled with
compilers that do not implement C99 fully.

 http://en.wikipedia.org/wiki/C11_%28C_standard_revision%29

 Features like _Generic -keyword would make life easier if we could
use them exclusively, but as long as we need to support older
compilers, there would be no gain in just adding new code as
alternative to old one, and not replacing old code with new one.

 Some features that I do find interesting in relation to freeciv
development at the moment:

 - Static assertions - that's something Jacob wanted to implement even
with old compilers, but I think we should use C11 syntax and just make
it optional
 - Multithreading support - we do need basic threading, so for pre-C11
envs we have to retain current pthread/winthread implementations as
alternative, but C11 threading should be used when possible. We also
use some non-mandatory (currently means: only optional threaded AI
needs them) threading features that could be made available in C11
systems only
 - Improved Unicode support - I haven't investigated what this means
in practice, but sounds like alternative to pulling libicu dependency
in as discussed earlier. Even libicu couldn't be hard requirement, so
implementing things optionally for C11 systems only is no worse in
that respect
 - Variable length arrays are *optional* feature in C11 while they
were mandatory in C99, and we do depend on that. It's unlikely that
any system that we would otherwise support won't have variable length
arrays support, but we have at least theoretical problem here.



 - ML

_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to