Static vs Dynamic Typing

Photo by israel palacio on Unsplash

There are 2 separate concepts to understand:

Strong vs Weak – Can variables change type?

Strong says no.
Weak says yes.

Static vs Dynamic – When do we check variable type?

Static checks at compile time….


This content originally appeared on DEV Community and was authored by Odai Athamneh

Photo by israel palacio on Unsplash

There are 2 separate concepts to understand:

  1. Strong vs Weak - Can variables change type?
    • Strong says no.
    • Weak says yes.
  2. Static vs Dynamic - When do we check variable type?
    • Static checks at compile time.
    • Dynamic checks at runtime.

Examples

💪 Strong 😖 Weak
🥶 Static Java, C++ ?
👟 Dynamic Python, Ruby JavaScript, PHP


This content originally appeared on DEV Community and was authored by Odai Athamneh


Print Share Comment Cite Upload Translate Updates
APA

Odai Athamneh | Sciencx (2022-05-08T19:33:58+00:00) Static vs Dynamic Typing. Retrieved from https://www.scien.cx/2022/05/08/static-vs-dynamic-typing/

MLA
" » Static vs Dynamic Typing." Odai Athamneh | Sciencx - Sunday May 8, 2022, https://www.scien.cx/2022/05/08/static-vs-dynamic-typing/
HARVARD
Odai Athamneh | Sciencx Sunday May 8, 2022 » Static vs Dynamic Typing., viewed ,<https://www.scien.cx/2022/05/08/static-vs-dynamic-typing/>
VANCOUVER
Odai Athamneh | Sciencx - » Static vs Dynamic Typing. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/05/08/static-vs-dynamic-typing/
CHICAGO
" » Static vs Dynamic Typing." Odai Athamneh | Sciencx - Accessed . https://www.scien.cx/2022/05/08/static-vs-dynamic-typing/
IEEE
" » Static vs Dynamic Typing." Odai Athamneh | Sciencx [Online]. Available: https://www.scien.cx/2022/05/08/static-vs-dynamic-typing/. [Accessed: ]
rf:citation
» Static vs Dynamic Typing | Odai Athamneh | Sciencx | https://www.scien.cx/2022/05/08/static-vs-dynamic-typing/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.