[gdal-dev] Adding k for const to RFC 8
Andrew C Aitchison
andrew at aitchison.me.uk
Fri Dec 15 23:44:00 PST 2017
On Fri, 15 Dec 2017, Kurt Schwehr wrote:
> I propose that we add 'k' for constant to
> https://trac.osgeo.org/gdal/wiki/rfc8_devguide It's a pretty common
> convention.
I'm happy to have that convention when reading,
but when writing code it will seem like an imposition.
> Starter links:
>
> https://stackoverflow.com/questions/5016622/where-does-the-k-prefix-for-constants-come-from
> https://google.github.io/styleguide/cppguide.html#Constant_Names
After reading the stackoverflow I'm less keen to add this.
Yes, this gives a slight hint to the human reader, but the compiler
will let me know if I try to change the value, so why do I need the
reminder throughout the code ?
I don't have a vote, but I think "-1".
Sorry,
--
Andrew C. Aitchison Cambridge, UK
andrew at aitchison.me.uk
More information about the gdal-dev
mailing list