mit计算机科学及编程导论(一) [ 小世界 ]

Type discipline:

  • habit of A: checking out operators or procedures to see what they do under different circumstances, either check them out or read the specifications of it.

  • habit of B: when you write your own code, you want to be disciplined about what types of arguments or operands you apply to operators.

assignment statement:

  • x = 3*5 and y = 15 binding same value. Let z = x give z a pointer to the same place. To the value, not to x.

code good style:

  • Don’t change types arbitrarily.
  • The choice of variable names is a great way of commenting your code, use variable names that make sense.