Friday 6 July 2012

What is strong-typing versus weak-typing? Which is preferred? Why?

Purpose:
  • Shows whether the developer has experience in different languages and has a working understanding of type management.
  • Referrals to either language constructs that supports weak typing or other languages that inherently are weakly typed would be a good sign.
  • A discussion of simplicity versus error reduction would be a sign that the developer thinks about his/her craft on a deeper level.

Potential Answer:
Strong typing = Types of variables are known at compile time and cannot change. Advantage here is that the behavior of the program is explicit.

Weak typing = Types of variables are know at runtime, thus value depends on how it is used. Advantage here is that less code intensive but makes code harder to understand since behavior is implicit to runtime.

No comments:

Post a Comment