Statically typed or dynamically typed are basically features of the programming language.
A statically typed language checks for type checking at compile time, whereas in the dynamically typed language the type checking is done at run time.
Some statically typed languages are C, C++, Java etc, whereas Python, Ruby and Perl are dynamically typed languages.
In statically typed languages, bugs due to variable type declaration can be detected earlier at compile time. Whereas in dynamically typed language, these bugs are only detected at run time.
For example if you try and add a string to a number in C++, the program wouldn't compile and throw error upfront
'2' + 7 would throw error at compile time in C, C++ or Java
Whereas in Python the same code doesn't throw error until and unless run time execution has reached that particular piece of code in question.
A statically typed language checks for type checking at compile time, whereas in the dynamically typed language the type checking is done at run time.
Some statically typed languages are C, C++, Java etc, whereas Python, Ruby and Perl are dynamically typed languages.
In statically typed languages, bugs due to variable type declaration can be detected earlier at compile time. Whereas in dynamically typed language, these bugs are only detected at run time.
For example if you try and add a string to a number in C++, the program wouldn't compile and throw error upfront
'2' + 7 would throw error at compile time in C, C++ or Java
Whereas in Python the same code doesn't throw error until and unless run time execution has reached that particular piece of code in question.
No comments:
Post a Comment