Comment

Comment by marcos100

Function comments should explain what it does, and comments inside functions should explain the how.

  // Receives n >= 0 and returns the n'th fibonacci number
  int fib(int n) {
      // We use the memoized version of the algorithm.
  }
parent marcos100 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton