Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Are you saying that if there had been type checking, this issue would have been much easier to detect and prevent?


How could it not be? With type checking, you wouldn't be able to set a variable to a number when it's supposed to be an object.


Yes a line like

stuff.anAccountTypeField = obj.aNumberValue;

Would cause an error in a typed language , something like incompatible type Number and type Account.

Maybe you were confused by my commnet about the network requests and different order of running code, this caused the error not to happen most of the time so it never crashed on developer machine.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: