CS 3304: Comparative Languages
Names and Binding
[
Course Documents
] : [
Names and Binding
]
Previous
Contents
Next
Keyword Index
Strong Typing
Advantage of strong typing: allows the detection of the misuses of variables that result in type errors
Languages:
FORTRAN 77 is not: parameters, EQUIVALENCE
Pascal is not: variant records
Modula-2 is not: variant records, WORD type
C and C++ are not: parameter type checking can be avoided; unions are not type checked
Ada is, almost (UNCHECKED CONVERSION is loophole)
(Java is similar)
Coercion rules strongly affect strong typing--they can weaken it considerably (C++ versus Ada)