Monday, March 21st 2016
Static/Strong vs Dynamic/Weak Typing
Static/strong and dynamic/weak are both gauges applied to how forceful a programming language is in enforcing a set of pre-specified of rules. Both strong and weak typed languages have their purpose. Software engineers utilize strongly-typed languages to avoid bugs and errors on run time, while also communicating purpose clearly (what type a value is expected to be). On the other hand, software engineers also utilize weakly-typed languages provides more flexibility to engineers to mess with variable type (guided by best practices), allowing them to be more creative in their code construction.
Specifically, static/dynamic typing is concerned about when type information is required (compile or runtime) whereas strong/weak typing is concerned about how strictly types are distinguished (though its definition is still the subject of scholarly debate). As such, try to avoid describing programming languages as either strong or weak and, instead, focus on describing them as static or dynamic. If a language pops up an error at runtime because you failed to specify the type of the variable, it's probably static and if it doesn't, it's probably dynamic.
References
http://blogs.agilefaqs.com/
https://en.wikipedia.org/wiki/Strong_and_weak_typing
http://stackoverflow.com/questions/2351190/static-dynamic-vs-strong-weak
No comments:
Post a Comment