[Lazarus] Hints usability

Joost van der Sluis joost at cnoc.nl
Sat Apr 11 11:48:02 CEST 2009


Op vrijdag 10-04-2009 om 22:51 uur [tijdzone +0200], schreef JoshyFun:
> Friday, April 10, 2009, 10:17:28 PM, you wrote:
> 
> >> In other words MY (capital, as it is my problem, maybe not the problem
> >> of other people) is that the amount of expected hints are hidding the
> >> non-expected ones.
> 
> CI> Right. And as I said, it would probably be more productive to disable an
> CI> entire type of hints.
> 
> Well, I compile my code with all checks and it must be
> error/warning/hint free before being considered ready.

Very nice that you have made up this rule for yourself. But as you've
find out you really make things complicated for yourself.

The fpc-team decided long time ago to make two different
compiler-messages. The 'warnings' which are construct of which the
compiler knows that they are always messy. In general, you should solve
those.

And there are 'hints', things which are things that the compiler finds
suspicious, but of which it CAN NOT BE SURE that it is a problem. Some
programmers do strange things, but they have a reason for that, or it's
too difficult for the compiler to decide if it's good or wrong, so it's
up to the programmer.

Keep this rules in mind. When you want to write hint-free code, that's
your choice, and it can lead to messy stuff. But don't blame the
compiler.

A system to disable/enable each hint seperately is discussed often and
there are some beginnings of implementations made. But it's not here
yet, and yes: patches are welcome.

If you have a situation in which you know that a hint is always a 'false
positive' and a way that the compiler could know that, you could try to
file a bug or make a patch.

Further, this is the wrong list to discuss this, because it's
fpc-specific, not Lazarus. Escpecially when you want that something is
done about this, this is the wrong place. (As Matthias already stated)

Joost




More information about the Lazarus mailing list