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

But that isn't what we're talking about. Changing a number to a string and using it as a string is exactly as bad as changing a string to a number and using it as a number.


> Changing a number to a string and using it as a string is exactly as bad as changing a string to a number and using it as a number.

Both of those are examples of strong typing in action.


No, they are both examples of weak typing in action. Both of those are an error in a strong type system. That's the point.


Only if the strong type system is specified to return errors on those kinds of mismatches, as opposed to using the type information to perform a conversion and give another result which is just as well-defined as an error.

That's the point: Strong typing ensures all results are well-defined, as the result of a specification, and it uses type information to do that. Weak typing throws away type information, so it can no longer uphold such specifications.


Your definition is one that you made up though. Most people use the actual definitions of words.




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

Search: