[GRASS-dev] Tabs and spaces in C code

Vaclav Petras wenzeslaus at gmail.com
Wed Aug 20 13:08:14 PDT 2014


as you know, in C code we have mixed tabs and spaces. When I was explaining
somebody why the files must be formated is such a strange way (either using
script, in editor, or manually), I realized that I really want to change it.

What about formatting the new files in some more standard way? For example,
using only spaces for all levels of indentation.

In other words, if there is some rule there should be some reasoning behind
it. Four spaces for first level and one tab for second level does not make
any sense to me. If old files cannot be changed, let's at least not
introduce bad practice to new files.

What do you think?



PS: Doing same for Python (mixing tabs and spaces) is considered as very
bad practice and there is even command line switch with will cause Python
to fail if you are doing this. Requiring to mix tabs and spaces for C and
not to mix for Python might lead to not keeping any rules because they are
contradicting each other.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20140820/a1a0f436/attachment.html>

More information about the grass-dev mailing list