What is the difference between statically typed and dynamically typed languages?

后端 未结 16 2050

I hear a lot that new programming languages are dynamically typed but what does it actually mean when we say a language is dynamically typed vs. statically typed?

16条回答
  •  遥遥无期
    2020-11-22 02:17

    Statically typed languages type-check at compile time and the type can NOT change. (Don't get cute with type-casting comments, a new variable/reference is created).

    Dynamically typed languages type-check at run-time and the type of an variable CAN be changed at run-time.

提交回复
热议问题