Dynamically typed language

What is a dynamically typed language?

Before we understand a dynamically typed language, we should learn about what typing is. Typing refers to type-checking in programming languages. 

  • In a strongly-typed language, such as Python, "3" + 2 will result in a type error since these languages don't allow for implicit conversion of data types. 
  • On the other hand, a weakly-typed language like Java, C++, will simply output "32" as result. Type-checking can be done at two stages 
  • Static - Data Types are checked before execution. 
  • Dynamic - Data Types are checked during execution. 
  • Python is an interpreted language, executes each statement line by line and thus type-checking is done on the fly, during execution. Hence, Python is a Dynamically Typed Language.



Thanks for reading!!

Comments

Popular posts from this blog

Python namespaces & LEGB rule in Python