Interview Questions

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

ASP.NET and .NET WEB Questions and Answers


(Continued from previous question...)

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

Strong type is checking the types of variables as soon as possible, usually at compile time. While weak typing is delaying checking the types of the system as late as possible, usually to run-time. Which is preferred depends on what you want. For scripts & quick stuff you’ll usually want weak typing, because you want to write as much less code as possible. In big programs, strong typing can reduce errors at compile time.

(Continued on next question...)

Other Interview Questions