js design patterns - the type of language

Programming language can be roughly divided into two categories:

  1. Statically typed language
  2. Dynamically typed language

Statically typed language has been determined at compile-time type, and the type of dynamically typed languages when you want to run the program
waiting to dynamically determined to belong to a certain type according to different values given.

 

Statically typed language advantages:

  Determine in advance the type of program can reduce errors, the compiler can optimize the code to do something;

Statically typed language disadvantages:

  Strongly typed lead programmer needs to write more code to the type of agreement, distraction programmer;

 

Dynamically typed language advantages:

  Less code, increase the readability of the code, the code focus on business logic;

Dynamically typed language disadvantages:

  No advance in the process of determining the type of running code can lead to errors;

Guess you like

Origin www.cnblogs.com/huangjie2018/p/11076302.html