chesslablab / php-chess

A chess library for PHP.
https://chesslablab.github.io/php-chess/
MIT License
101 stars 45 forks source link

Writing code comments #595

Open programarivm opened 5 hours ago

programarivm commented 5 hours ago
          @programarivm can we add some comments for abstract methods to make it easy to understand the action for someone who is building new functionality?

Originally posted by @gurpreetkaits in https://github.com/chesslablab/php-chess/issues/467#issuecomment-2365066058

programarivm commented 5 hours ago

Well I am of the opinion that comments shouldn't be necessary if the code is good, but let's elaborate on the issue. Shall we elaborate a list of about five classes requiring comments?

gurpreetkaits commented 4 hours ago

It should be necessary at least for common methods, which can be used in any other classes as well. For example, if I'm building the BackRankEval feature, then moving to any parent class comments can give a better understanding in short.