n=1_000_000_000 s=0 c=1 h=1/n for j in range(0,n): sHelp=s+c*h cHelp=c-s*h s=sHelp c=cHelp print s,cI intended to solve the sine and cosine ordinary differential equations with initial conditions by Euler’s numerical method. I thought that Boo was a language like JavaScript or Lua, and that s and c and h would be in “double” mode. No, they were in “int” mode, because of type inference. There were no diagnostics at compile time or run time, and there was no crash, but the answers were wrong.
My complaint is not against the Boo language but against type inference. I wish each computer language doing type inference to have a command-line switch to switch type inference off and force type declaration.
The date of latest revision of this page is 2 March 2012. Constructive and destructive comments come to me, Harold M. Kaplan,
at dot
smtw2gh gmail com
For my other pages on programming please click on programming.htm.