Possible Duplicates:
What is a strictly typed language?
What are the key aspects of a strongly typed language?
What does it mean that language is strongly typed?
Possible Duplicates:
What is a strictly typed language?
What are the key aspects of a strongly typed language?
What does it mean that language is strongly typed?
Look at http://eli.thegreenplace.net/2006/11/25/a-taxonomy-of-typing-systems/ and http://en.wikipedia.org/wiki/Type_system
"Strong typing" can have slightly different meanings depending on context (or who you ask), but generally it means that a language will not implicitly convert one datatype to another.
The terminology around typing is dreadfully confusing. One interpretation is that of type safety - whether a language allows you to subvert the type system.
C and Delphi do, by having void *
and Pointer
types, respectively.
Java and C# does not: even though there's Object
, you will get a runtime exception if you try casting a Foo to Object only to cast it into Bar (where Bar and Foo are not in the same inheritance chain).
Note that "strongly typed" is independent of manifest typing - declaring the types of your variables like C or Java - and latent typing, where you don't, like Smalltalk.
Back in the day we didn't have these namby-pamby "dynamic" languages - men were men, boys were boys and ints were ints. A char by any other name was just a byte. We had to cast our variables explicitly both ways through an assignment operation. You kids today have it easy, doing arithmetic operations on strings and concating variables with a compiler error in the world! And you're all into this duck-type thing with weak values...
Seriously though, strong typing means that the language places restrictions on your data types. You have to explicitly give your variables a type (such as int or string) and you need to cast or convert them when you want to change them to another type. C++ and Java are examples of strongly typed languages. In those languages you can't do:
"12" / 3;
Since you can't divide a string by an integer. However some languages such as perl and python will let you do that, and "12" will be converted to 12 automagically.