This discussion is interesting. I was aware of the issue, and i ignored it.
Not because i am such a sloppy person, but rather because i tend to look at
such issues from the engineering point of view: Risk = Probability * Consequence.
One may strive after absolute certainty, but sometimes all the machinery needed
to provide that will cause more trouble than the mischief itself, if it happened.
The probability that a 32 bit variable is misread seems extremely small to me.
Modern processors handle 32 or 64 bits at the time, which implies that a 32 bit
variable is put in place in one single operation.
If it were about a string or an array this would have been different.
Looking at the possible consequences i do not see big dangers either.
If this were about software for rocket launching, or the stock exchange, i would
have been much more careful. But as it is in the given case about a simple
messagebox, probably the worst that could happen in the unlikely case that
things would go wrong, is a user saying "Hey didn't work, let me try again".
In my opinion in the given case it is about a very unlikely phenomenon, that even
if it happened would not cause any real problems, and i therefore did not find it
worthwhile to do anything to prevent it.
Arie Verheul
Not because i am such a sloppy person, but rather because i tend to look at
such issues from the engineering point of view: Risk = Probability * Consequence.
One may strive after absolute certainty, but sometimes all the machinery needed
to provide that will cause more trouble than the mischief itself, if it happened.
The probability that a 32 bit variable is misread seems extremely small to me.
Modern processors handle 32 or 64 bits at the time, which implies that a 32 bit
variable is put in place in one single operation.
If it were about a string or an array this would have been different.
Looking at the possible consequences i do not see big dangers either.
If this were about software for rocket launching, or the stock exchange, i would
have been much more careful. But as it is in the given case about a simple
messagebox, probably the worst that could happen in the unlikely case that
things would go wrong, is a user saying "Hey didn't work, let me try again".
In my opinion in the given case it is about a very unlikely phenomenon, that even
if it happened would not cause any real problems, and i therefore did not find it
worthwhile to do anything to prevent it.
Arie Verheul
Comment