Static/strong typing and refactoring

后端 未结 5 1853
谎友^
谎友^ 2021-01-05 11:21

It seems to me that the most invaluable thing about a static/strongly-typed programming language is that it helps refactoring: if/when you change any API, then the compiler

5条回答
  •  灰色年华
    2021-01-05 12:09

    I would say refactoring goes beyond what the compiler can check, even in statically-typed languages. Refactoring is just changing a programs internal structure without affecting the external behavior. Even in dynamic languages, there are still things that you can expect to happen and test for, you just lose a little bit of assistance from the compiler.

提交回复
热议问题