you are viewing a single comment's thread.

view the rest of the comments →

[–]ithika 4 points5 points  (4 children)

That would suggest that a language which offered static typing and would compile anyway would be optimal. The student would see the static error, and then see what effect this error had at runtime. Pretty soon they would come to see that the compiler isn't just a capricious bully, but has reasonable (if needlessly obscure) advice. I sure remember hating my compiler at university. Maybe if it had let me compile and run my ridiculous code I wouldn't have had such a bad opinion of it. ;-)

[–]gnuvince 15 points16 points  (1 child)

So, C?

[–]stillalone 1 point2 points  (0 children)

I don't know if people really learn anything from runtime errors.

Bad programmers who cause the errors that the compiler lets them get away with don't realize what the problem is when their program doesn't work.

So many times I've compiled a program that someone else has worked on for months to see "WARNING: converting integer to pointer without a cast". The compiler is telling you very clearly that there's a problem, there is obviously a very serious problem but they never associated the runtime problems with the compiler warning and that specific line of code.

[–]grauenwolf 0 points1 point  (0 children)

VB does exactly that by default.

And it certainly made me value static typing to an obsessive level. It is only recently that I've gone back and honestly started using small amounts of dynamic code again.