+ 1
Type Compatibility
What is Type Compatibility in Programming Languages? Brief explanation Please!
1 ответ
+ 2
Exept for js, all programming languages have Type Compatibility as a strong rule. It says that vars only of the same type are compatible, or you can easily make it:
Int some;
Int thing = some;
There is an exception for int and float, because both are numbers. But you can't make it: bool some = "thing"; some can be only true or false, but not a string. It's made to keep the syntax more ordered and strict, so the debugging wouldn't be a pain.