you are viewing a single comment's thread
view the rest of the comments
[–] 1 point 6 months ago* (last edited 6 months ago) (7 children)

Not sure I'm following the jump from significant whitespace to machine code. How are those related?

  • source
  • parent
  • hideshow 7 child comments
  • [–] 2 points 6 months ago* (6 children)

    Human and machine read differently. If you ignore that (in case with indentation), then why bother with writing human-friendly form of code, when what is going to be really executed is something else?

  • source
  • parent
  • hideshow 6 child comments
  • [–] 1 point 6 months ago (5 children)

    If anything, that sounds like an argument in favor of significant indentation, not against it. Humans and machines read differently, yes, which is why we tend to add whitespace and indentation to code even for programming languages where it's not significant. We do that expressly because it makes the code more human-friendly, so it's quite the opposite of ignoring their differences.

  • source
  • parent
  • hideshow 5 child comments
  • [–] 1 point 6 months ago (4 children)

    No, it is an argument against it. We indent code so that it is more comfortable to read it, not in order to make it easier to understand

  • source
  • parent
  • hideshow 4 child comments
  • [–] 1 point 6 months ago (3 children)

    You're mistaken:

    Indentation is a secondary notation that is often intended to lower cognitive load for a programmer to understand the structure of the code.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 1 point 6 months ago (2 children)

    Lol. Go on, show me how it is easier to understand structure of the code when I am 3 levels down, first two are already out of sight

  • source
  • parent
  • hideshow 2 child comments