Hi Stephan,

> In the case of sal_Bool, it might be true that false is a better default 
> value than true (no pun intended), but that need not be the case always, 
> so you would have to analyze each place in the code where you add "= 
> false", which is tedious due to the large number of places involved.

Sure, this analysis has to take place. forgive me if I missed this in
the thread: About which order of magnitued do we talk here? 10 places?
10000?

> And still, I personally consider it a degradation of code quality to 
> explicitly assign an (arbitrary) default value to a variable in places 
> where it is obvious that the variable is only used after definitively 
> having been assigned to (in places where that is not obvious, I think it 
> is often better to restructure the code to make that obvious, than to 
> initially assign an arbitrary dummy value to the variable; rationale: in 
> the latter case, the reader has to scan the code to find out whether the 
> initial assignment is of importance, or merely there to silence warnings 
> from the compiler).

Well, the warning could be an indicator to think about whether
restructuring would be a good idea here ...

That's the basic idea behind warnings, isn't it? Sometimes, they point
to an error - then fix it. Sometimes, they don't, then check whether you
can write code which doesn't expose the warning. This does not always
mean "silence the warning by brute force" (which is assigning a default
in our case), but "restructure your code so it becomes better and less
warning-prone" is of course always a valid alternative :)

> ...but only on compilers where we can achieve this with a reasonable 
> amount of work.  If we would need to make lots of "hacky" changes to 
> make a single version of GCC work, while most other versions (even more 
> recent ones) of GCC would not need that, I think we should weigh what is 
> more important.  That's all I wanted to say.

Okay, I agree. As said, I might have missed the number of places
affected. For a certain amount, I'd probably also say it's not worth it
... (though my gut feeling is that my limit would be higher than your's
here :)

> Not supporting GCC 4.0.2 is the alternative that springs to my mind (see 
> above).

Okay, cannot judge how many people will be repelled by this. But if it's
as buggy as you say, this might be no problem, anyway ...

Ciao
Frank


-- 
- Frank Schönheit, Software Engineer         [EMAIL PROTECTED] -
- Sun Microsystems                      http://www.sun.com/staroffice -
- OpenOffice.org Database                   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to