Strongly-typed Programming Language

In computing, strongly-typed, when applied to a programming language, is used to describe how the language handles datatypes. "Strongly-typed" may have one of several incompatible meanings, depending on context. A programming language that is not strongly-typed is called weakly-typed. Some of the meanings that have been ascribed to "strongly-typed" include:
  1. A language is strongly typed if type annotations are associated with variable names, rather than with values. If types are attached to values, it is weakly typed.
  2. A language is strongly typed if it contains compile-time checks for type constraint violations. If all checking is deferred to run time, it is weakly typed.
  3. A language is strongly typed if it contains compile- or run-time checks for type constraint violations. If no checking is done, it is weakly typed.
  4. A language is strongly typed if conversions between different types are forbidden. If such conversions are allowed, it is weakly typed.
  5. A language is strongly typed if conversions between different types must be indicated explicitly. If implicit conversions are performed, it is weakly typed.
  6. A language is strongly typed if there is no language-level way to disable or evade the type system. If there are C-style casts or other type-evasive mechanisms, it is weakly typed.
  7. A language is strongly typed if it has a complex, fine-grained type system with compound types. If it has only a few types, or only scalar types, it is weakly typed.
  8. A language is strongly typed if the type of its data objects is fixed and does not vary over the lifetime of the object. If the type of a datum can change, the language is weakly typed. (This property is often, and less ambiguously, called "static typing.")
Note that some of these definitions are contradictory, while others are merely orthogonal. Because there is no generally-agreed meaning for the phrase "strongly-typed language," it is possible to find authoritative statements that many languages both are and are not strongly-typed. For example, under definitions 1, 7, and 8, the C language is strongly typed; under 4, 5, and 6 it is weakly typed — with definitions 2 and 3 open for further debate since C does perform type checks for compound types but not for scalar or array types. Accordingly, it is easy to find people who will claim that C is a "strongly-typed" language and others who will claim that it is a "weakly-typed" language. Programming language expert Benjamin C. Pierce has said:
I spent a few weeks . . . trying to sort out the terminology of "strongly typed," "statically typed," "safe," etc., and found it amazingly difficult. . . . The usage of these terms is so various as to render them almost useless.
For a more thorough discussion of typing issues, see the article on datatypes and its related topics.

 

<< PreviousWord BrowserNext >>
intrawest
snow white and rose red
cornplanter
dinosaur (movie)
speedwell (ship)
patric zimmerman
james hormel
nez perce national forest
kouprey
dut
the 20 minute workout
clearwater national forest
black black
netta
eo navia (asturian comarca)
treble charger
trs 80 mc 10
on being sane in insane places
yuki yokosawa
samson et dalila
exorcist: the beginning
sanctuary arts
parody advertisement
cuesta
nesl
sunlight park
hanlan's point stadium
wudaokou
modern school
maple leaf stadium
yulia nesterenko
achille urbain
the chocolate soldier
pirate tv
catgut
rapso
douglas marland
four tet
set theoretic programming
adrian lyne
palmdale regional airport
pmd
headset (bicycle part)
pero cameron