Paul Eggert wrote on 2005-11-18:
> I prefer putting type qualifiers like "const" after the types they
> modify, as that's more consistent.  ...
>
> Not everyone agrees with this style, but I suspect this is often
> because they haven't thought through the consistency issues.

While I know that "char const *" is more consistent, I prefer to use
"const char *", because it's an idiom that most C programmer know and
understand. Like the parsing of natural language, the parsing of a C
program by a human is largely based on idioms, and "const char *"
meaning "string" is such an idiom.

It's the same reason why I use 'bool' (rather than 'unsigned char' or
'_Bool') to denote a boolean value: it's the common idiom for this type,
therefore using that idiom - rather than rolling your own - makes programs
more readable.

Bruno



_______________________________________________
bug-gnulib mailing list
bug-gnulib@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnulib

Reply via email to