4 ms·
I think mschulze means he cannot even be sure what the function returns without having to read the source code. There could be comments but they may be outdated
by tqkxzugoaupvwqr 10y ago
I think mschulze means he cannot even be sure what the function returns without having to read the source code. There could be comments but they may be outdated or incomplete. In statically typed languages you can look at the function signature or rely on the compiler errors.
- jeremiep 10y agoYes but my point was that this is very incomplete information to do engineering with. You're still going to look at the source to learn what side-effects are present or how your arguments are used. Not taking these details into account will be the source of most bugs :)
- trobertson 10y agoA good type system will expose the existence of side effects. However, it is true that good type systems are very rare in industry.