Skybuck Flying
2011-07-06 04:43:42 UTC
byte := word;
word := longword;
integer := int64;
^ all these assignments are allowed without a warninng.
Therefore these pieces of code are potential bugs which will show up only
later under more extreme circumstances.
Combinations of extreme circumstances are also possible for example with
overloaded functions and the programmer believing that the correct type is
being used while in reality some else could cause the wrong overloaded
function to be used.
These are extreem circumstances but also require extreme debugging
skills/programs ;)
Therefore I suggest that at least the compiler gets special options which
can be enabled for:
"extra range checking" and "warn for potential precision loss or overflowed
assignments".
Something like that...
Bye,
Skybuck.
word := longword;
integer := int64;
^ all these assignments are allowed without a warninng.
Therefore these pieces of code are potential bugs which will show up only
later under more extreme circumstances.
Combinations of extreme circumstances are also possible for example with
overloaded functions and the programmer believing that the correct type is
being used while in reality some else could cause the wrong overloaded
function to be used.
These are extreem circumstances but also require extreme debugging
skills/programs ;)
Therefore I suggest that at least the compiler gets special options which
can be enabled for:
"extra range checking" and "warn for potential precision loss or overflowed
assignments".
Something like that...
Bye,
Skybuck.