Hello,
Paul Eggert writes:
> All other things being equal, we should be encouraging a functional
> style in which most local variables and parameters are never modified
> once set.
Agreed. How about adding something along these lines in the GCS?
Thanks,
Ludo’.
I agree with Bruno on this point. It's hard enough to read C code
without having to wade through all those 'const's on local variables.
The tiny extra benefit that they provide is not worth the overhead on
people trying to read the code. What's next? Should we also add
'const' to parameter decla
James Youngman wrote:
> On Sun, Apr 11, 2010 at 1:08 PM, Bruno Haible wrote:
>> James Youngman wrote:
>>> * lib/close-stream.c (close_stream): Make boolean variables const
>>> to document the fact that we set but do not change them.
>>> --- a/lib/close-stream.c
>>> +++ b/lib/close-stream.c
>>> @@
On Sun, Apr 11, 2010 at 1:08 PM, Bruno Haible wrote:
> James Youngman wrote:
>> * lib/close-stream.c (close_stream): Make boolean variables const
>> to document the fact that we set but do not change them.
>> --- a/lib/close-stream.c
>> +++ b/lib/close-stream.c
>> @@ -55,9 +55,9 @@
>> int
>> clo
James Youngman wrote:
> * lib/close-stream.c (close_stream): Make boolean variables const
> to document the fact that we set but do not change them.
> --- a/lib/close-stream.c
> +++ b/lib/close-stream.c
> @@ -55,9 +55,9 @@
> int
> close_stream (FILE *stream)
> {
> - bool some_pending = (__fpend