Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@MaxKellermann
Copy link
Contributor

@MaxKellermann MaxKellermann commented Jan 30, 2023

Several PHP maintainers have argued that code comments explaining include directives are bad.

I don't agree with them; I believe that code comments help others understand and maintain the code. Of course, like any code comment, they become obsolete and wrong, but outdated comments are still better than no comment at all. With this argument, you can easily say that nobody should ever write a code comment.

My RFC https://wiki.php.net/rfc/include_cleanup contains a vote on whether #includes are allowed to have explanatory code comments; if this is denied, then please merge this PR to get rid of many existing comments which my work has imitated.

Several PHP maintainers have argued that code comments explaining
include directives are bad.

- @dstogov wrote "It adds almost useless comments that are not goigg
  to be kept as to date"
  https://marc.info/?l=php-internals&m=167403155727727&w=2

- @derickr wrote "Adding comments that go out of date as to why a
  header is included is also clutter."
  https://marc.info/?l=php-internals&m=167405646312575&w=2

- @kamil-tekiela wrote "I am against putting comments on
  #includes. Comments are noise in code and often go out of date."
  https://marc.info/?l=php-internals&m=167406432218721&w=2

I don't agree with them; I believe that code comments help others
understand and maintain the code.  Of course, like any code comment,
they become obsolete and wrong, but outdated comments are still better
than no comment at all.  With this argument, you can easily say that
nobody should ever write a code comment.

My RFC https://wiki.php.net/rfc/include_cleanup contains a vote on
whether #includes are allowed to have explanatory code comments; if
this is denied, then please merge this PR to get rid of many existing
comments which my work has imitated.
@MaxKellermann MaxKellermann force-pushed the remove_include_comments branch from 95c38a5 to f667717 Compare February 7, 2023 18:51
@MaxKellermann MaxKellermann marked this pull request as ready for review February 15, 2023 15:12
@MaxKellermann MaxKellermann deleted the remove_include_comments branch March 6, 2023 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant