2 ms·
> The biggest advantage of static typing, in my opinion, is that simple refactorings like "rename" or "move method from one class to another class" or "change w
by zeveb 9y ago
> The biggest advantage of static typing, in my opinion, is that simple refactorings like "rename" or "move method from one class to another class" or "change what method does and then modify all places that call it" are done routinely and very often.
Note that this is very doable in a dynamic language environment like Smalltalk or Lisp: you're constantly interacting with the running system, and so can easily rename a function or method, update all source locations, update the class of live instances (e.g. UPDATE-INSTANCE-FOR-REDEFINED-CLASS[0]) and even change the class of live instance (e.g. UPDATE-INSTANCE-FOR-DIFFERENT-CLASS[1]).
> The other big advantage is when I am learning somebody elses code, all info about who calls who and how is right there.
Again, a live environment is capable of tracking all callers & callees. It's pretty awesome, and honestly the only way I'd prefer to develop.
[0] http://clhs.lisp.se/Body/f_upda_1.htm http://clhs.lisp.se/Body/f_upda_1.htm
[1] http://clhs.lisp.se/Body/f_update.htm http://clhs.lisp.se/Body/f_update.htm