Strong Typing

In Data-processing, a Computer programming language is known as strongly typified when it guarantees that the standard data employed correctly describe the handled data. By opposition, a language without strong typing is known as slightly typified.

Since its invention, the term of strong typing was employed with many contradictory directions, which removed any significance almost to him. The list which follows gathers some possible assertions on strong typing, with examples of languages strongly typified and having respecting the criterion and the counterexample of languages also strongly typified but not respecting the criterion:

  1. a language is strongly typified if the type of data is associated in the name of the variable , rather than with its value. If the type is attached to the value, the language is slightly typified. Example: Java. Counterexample: OCaml, which generally is regarded as even more strongly typified than Java.
  2. a language is strongly typified if the Compilateur is able to detect errors of typing . If the errors of typing are recognized only with the execution, the language is slightly typified. Example: OCaml. Counterexample: Design.
  3. a language is strongly typified if compilation or the execution can detect errors of typing . If these errors are never recognized, the language is slightly typified.
  4. a language is strongly typified if implicit conversions of types are formally prohibited . So of such conversions are possible, the language is slightly typified. Example: OCaml. Counterexample: Haskell, which generally is regarded as even more strongly typified than OCaml.
  5. a language is strongly typified if conversions between types must be explicitly described . So implicit conversions are used, the language is slightly typified. Example: OCaml.
  6. a language is strongly typified if no mechanism of the language makes it possible to pass in addition to the interdicts of trans-typing . If these mechanisms exist, like the transtypage (called cast in English) in Langage C, the language is slightly typified. Example: Haskell.
  7. a language is strongly typified it has a complete typing, combining simple types and made up types . If it has only some types, or only simple or scalar types, the language is slightly typified.
  8. a language is strongly typified if the type of its data is fixed and cannot vary during the lifespan of the object. If the type of a data can change, the language is slightly typified. One calls that the dynamic Typage.
  9. a language is strongly typified if the system of typing provides strong guarantees on the behavior to the execution of the program before this execution. If the guarantees provided by the system of typing are not strong, this language is as well as possible slightly typified.

Some of these definitions are contradictory.

Because there is no clear definition of what is strongly typified or not, it is possible to find instructions in a language which return in turn it strongly typified or slightly typified. Thus in definitions 1,7 and 8, the Langage C is strongly typified, while according to definitions 4,5, and 6, it is slightly typified - by leaving the open debate for items 2 and 3 since C allows checks for the composed types, but not for the lists or the types scalar. It is thus easy to find people convinced that it “It is strongly typified, and quite as easy to find some who will affirm that it is slightly typified.

Thus, an expert in computer programming languages, Benjamin C. Pierce, tells:

I spent a few weeks to be tried to clarify the terminologies " strongly typé" , " statically typé" , " sûr" , etc, and I found that extraordinarily difficult… The use of these terms is so varied that it makes them almost useless.

Random links:Portsall | Producto infinito | Scottish culture | Atina | Louis Bazerque | Hospitalo-centrism | Furman,_la_Caroline_du_Sud