Strongly Typed

What Does Strongly Typed Mean?

Strongly typed is a concept used to refer to a programming language that enforces strict restrictions on intermixing of values with differing data types. When such restrictions are violated and error (exception) occurs.

Advertisements

Techopedia Explains Strongly Typed

Examples of strongly typed languages in existence include Java, Ruby, Smalltalk and Python. In the case of Java, typing errors are detected during compilation Other programming languages, like Ruby, detect typing errors during the runtime.

In strongly typed languages, the behavior of operations is more predictable compared to those of weakly typed languages. The downside is having to declare and type all variables and parameters – though some would argue this is simply good coding.

The differentiation between strongly typed languages and weakly typed languages is somewhat blurry. Some of the languages considered strongly typed actually allow concessions that make them weakly typed. Take C#, for example. While C# requires all its variables to have a defined type, it allows the programmer to disable dynamic type checking. Even Java, considered one of the most strongly typed programming languages, allows objects to be cast to other types.

Advertisements

Related Terms

Margaret Rouse

Margaret is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical business audience. Over the past twenty years, her IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages.