Proposal: Amend the Inline Documentation Standards for multi-line comments

This is a small proposal to amend the standards for multi-line comments. The current standards seem to require that multi-line comments have to be done like this:

/*
 * This is a comment that is long enough to warrant being stretched over
 * the span of multiple lines. You'll notice this follows basically
 * the same format as the PHPDoc wrapping and comment block style.
 */

There is also a warning that they must not begin with /** as that is the DocBlockdocblock (phpdoc, xref, inline docs) syntax, and may result in parsing errors.

The proposal is to remove this requirement and to encourage multi-line comments to be done with slashes, same as single-line comments.

// This is a comment that is long enough to warrant being stretched over
// the span of multiple lines. You'll notice this follows basically
// the same format as the single-line comment style.

Reasons:

  • Reduce possibility of typos and eventual parsing errors. This is not just from typing, seems many modern IDEs can auto-complete or auto-correct /* to /** which may lead to more typos.
  • The de-facto JavaScriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user’s browser. https://www.javascript.com/. coding standard Prettier, and the PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher’s PSR-12 do not enforce specific comment styles.
  • In addition to encouraging typos, the current standard is visually very close to the DocBlock standard which may lead to a moment of confusion when reading the code (uh, is this an incomplete DocBlock that doesn’t have @since and @param?).

#proposal