+ 1

Type Compatibility

What is Type Compatibility in Programming Languages? Brief explanation Please!

28th Jan 2019, 6:33 PM
Bhanu Prakash
Bhanu Prakash - avatar
1 Resposta
+ 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.
30th Jan 2019, 7:13 PM
Charlie S
Charlie S - avatar