FACTOID # 165: Bolivia has 4,500 Navy personnel - which seems like quite a lot for a landlocked country.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

FACTS & STATISTICS    Simple view

  1. Select countries to view: (hold down Control key and click to select several)

     

     

    Compare:

     

     

  1. Select fact or statistic: (* = graphable)

     

     

     

  2. (OPTIONAL) Compare to statistic: (both need to be graphable)

     

     

     

  3. View result as:

     

       
(OR) SEARCH ALL encyclopedia, stats & forums:   

Encyclopedia > Strong typing

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.


  Results from FactBites:
 
Strongly-typed programming language - Wikipedia, the free encyclopedia (608 words)
Type safety; that is, the rejection (at either compile or run time) of operations or function calls which attempt to disregard data types.
Types must be converted by an explicit notation such as a function that accepts one type and returns a different one.
C-style casts, or the ability to use a pointer to one type as if it had contained a different type, are disallowed.
strong - definition by dict.die.net (554 words)
Moving with rapidity or force; violent; forcible; impetuous; as, a strong current of water or wind; the wind was strong from the northeast; a strong tide.
Ardent; eager; zealous; earnestly engaged; as, a strong partisan; a strong Whig or Tory.
Strong conjugation (Gram.), the conjugation of a strong verb; -- called also old, or irregular, conjugation, and distinguished from the weak, or regular, conjugation.
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.