Comment by latexr
6 hours ago
I get why people like indentation for this. I don’t think there’s a right or wrong answer and it’s a matter of personal preference.
That said, my preference is curly braces (or whatever) because I’ve found indentation is often a bother. Yes, most of the time you use indentation together with braces, but not every time. There are many occasions where code is clearer without (or with custom) indentation. Furthermore, indentation-based parsing makes experimentation and finding issues more difficult. Sometimes you need to extract a small part of a larger block to bung in a REPL or something and now you’re fighting with stupid errors because of formatting, adding to the frustration.
Regarding intuitiveness, for beginners I have some doubts it makes much of a difference, and if it does I also doubt indentation wins. If you know how to write (which is a prerequisite), you know what parenthesis and quotation marks are, you understand they encapsulate something separate from the rest. Indentation is a different concept.
I think indentation tries to step towards an outline, but without the item indicators we’d use in an outline format. This might actually be a selling point for something like YAMLScript.
https://yamlscript.org/
I get why people blame indentation like this. I don't think it's right or wrong to ignore the tooling that directly addresses minor issues with indentation or matching braces honestly.
That said, my preference is to use the tools built into my editor and available on the CLI or web to assist and fix formatting and syntax. You get instant feedback on incorrect formatting, and I generally find that synthetic scope mistakes (regardless of method) are eliminated.