you are viewing a single comment's thread
view the rest of the comments
[–] 3 points 11 months ago* (last edited 11 months ago) (2 children)

It does make it easier to read. We primarily use indentation to match brackets, so clearly, indentation is the most important readability feature between the two, not brackets.

Try reading the same piece of code: without brackets, and then without whitespaces and tell me which is better.

Whitespaces as syntax force you to indent your code properly and not be misleading.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 1 point 11 months ago* (1 child)

    I literally do that professionally, and I'm telling you that brackets are inarguably better.

    You are used to whitespace; I have literally spent months refactoring and upgrading a react frontend and a python backend and am telling you that brackets are a single character and far more predictable, and then your IDE / Linter / Formatter can reliably use them to fill in the perfect indentation and whitespace.

    My first professional language was Python, but I have since tried a half dozen others and would never choose to go back to a whitespace based language unless there was a good reason.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 11 months ago

    Brackets are infinitely easier because any IDE (and most text editors) have a dead simple linting plugin which auto indents for you and lets you know when you fucked up. Your editor can barely do anything with whitespace only because everything is valid syntax.

    Also lemme take this opportunity to say fuck yaml for exactly this reason.

  • source
  • parent