On 27-Sep-1999, S.D.Mechveliani <[EMAIL PROTECTED]> wrote:
> -- C++ -------------------------------------------------------------
...
> int condition2 (vector<long> x)
> {int i = 0;
>  while  ( i < 20  &  x[i]==9-i )  i++;

That has undefined behaviour, since your vector `x' only has length 10,
not 20.

I suppose this goes to show that although it may be easier to write 
fast programs in C++ than in Haskell, it certainly does seem easier to
write correct programs in Haskell than in C++ ;-)

-- 
Fergus Henderson <[EMAIL PROTECTED]>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED]        |     -- the last words of T. S. Garp.



Reply via email to