|
From: | Julian Foad |
Subject: | Re: [bug-grep] PARAMS, gnulib update and const |
Date: | Mon, 21 Mar 2005 12:10:04 +0000 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b) Gecko/20050217 |
Claudio Fontana wrote:
gnulib has removed PARAMS and thus support for pre-c89 compilers in 2003. By importing gnulib, we will have some code using PARAMS and some code assuming c89 or better compiler. I would suggest following the gnulib and removing the PARAMS clutter entirely. The alternative of importing gnulib, then patching it to add PARAMS seems unpratical to me.
I would be happy with removing any kind of support for pre-c89 compilers that is awkward for us, such as this PARAMS business.
In grep we have a pervasive use of const. It might be a matter of taste, but personally I find const useless,
I find it very helpful when used appropriately (which is usually to declare that a pointer is not to be used for writing to the pointed-to objects).
but what matters more is that the current code casts away const when needed. I would suggest a hunt-the-const.
Certainly casting away "const" nearly always indicates a design error. If by "hunt the const" you mean fixing mis-uses of "const" then please do so. (If you mean removing appropriate uses of "const", then please do not.)
- Julian
[Prev in Thread] | Current Thread | [Next in Thread] |