Hacker News new | ask | show | jobs
by tpoacher 1036 days ago
Are the "[a]" footnotes also meant to be "subtly wrong" for shits and giggles?

Footnote 1.5 for instance sounds completely wrong, as if the author is mixing up definition for declaration, and initialisation for definition:

declaration: lets the compiler know the existence of a symbol and its type, without allocating memory for it yet or assign a value. Either of those can happen in a different compilation unit and linked after after the compilation stage. e.g.

  extern int bar;
definition: arguably a poor choice of name, but this is the point at which a definitive space in memory is reserved for this variable. If no previous declaration for this symbol has taken place, the symbol is also declared as above too. The value in the newly allocated memory is effectively garbage, since it has not been initialised at yhis step. E.g.

  int bar;
initialisation: the assigning of contents into the memory portion that has been allocated for that symbol.

  bar = 5;
simultaneous declaration, definition, and initialisation in a single step:

  int bar = 5;