Archive

Archive for August, 2011

Dynamically Typed, Statically Typed, Strongly Typed, Weakly Typed

August 19, 2011 Leave a comment

A Programming language can be Dynamically Typed, Statically typed, Strongly Typed and Weakly Typed. Whats the difference?
Dynamically Typed:
There is no type check at compile time. If you pass wrong parameter types to a method, no compilation errors occur. Runtime failures happen. Examples are Ruby, Python.
Statically Typed:
There is type check at compile time. If you pass wrong parameter types to a method, compilation errors occur. Example : Java
Weakly Typed:
If type conversion happens, when you send different parameter to that expected (If possible, ofcourse).
Strongly Typed: NO type conversion happens, when you send different parameter to that expected (If possible, ofcourse).

Ruby is Strongly typed and dynamically typed.