Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you are changing the signature of a method that is part of the implementation in order to improve readability, clean up design, or remove dead code, it is refactoring. Refactoring isn't just as simple as renaming classes and methods; it often requires more significant changes than that.

Example:

  /* old */
  LoadWeapon(WeaponTypeEnum type);
  UnloadWeapon(WeaponTypeEnum type)
  LaunchWeapon(WeaponTypeEnum type);
  /* new */
  WeaponCommand(WeaponTypeEnum type, WeaponCommandEnum command);
Note... assume that the interface is a GUI, so changing these methods doesn't change any external interface.


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: