Hacker News new | ask | show | jobs
by jacquesm 3358 days ago
Definitely not. I can't imagine exploratory programming in a language that dictates overhead right from the beginning, and even later on some stuff is just too obvious to document.

Compilers should stick to their job: turning human readable code into efficient machine executable code with a minimum of fuss, a maximum of speed and errors where the human readable code leads to either undefined behavior or is simply incorrect.

Enforcing coding styles and documentation requirements should be left to plug-ins for your favorite CI set-up or, alternatively, to stand alone executables or scripts.

The only thing forced documentation will lead to is lots of boilerplate or blank stuff to satisfy the compiler, it will not lead to better documentation.

This is roughly the state of affairs with lots of autodoc docs, it's rare to see good documentation that has been automatically produced but it is very common to see page after page of extremely poor automatically generated documentation. Which then of course gets no love at all because after all, the documentation is already done.

1 comments

Exactly. I've seen my fair share of

  /**
   * Gets the thing for the ID.
   *
   * @param id the ID of the thing
   * @return the thing
   */
  Thing* getThing(int id) {
    return things[id];
  }
It seems to be a dynamically typed language. So they require developers to put type annotations into comments so that the compiler cannot make use of them. Oh well.