Questions tagged [indentation]

For questions relating to indentation, where whitespace at the beginning of lines is used to structure and organise code. Use this tag for questions about indentation-sensitive parsing or language designs.

Filter by
Sorted by
Tagged with
26 votes
2 answers
3k views

Studies on learnability of braces vs. indentation for code blocks for beginners?

The discussion whether using indentation for code blocks is better or worse than using braces is an old one, but I don't want to rehash that discussion here (for reference, there was a fairly recent ...
Schmuddi's user avatar
  • 363
6 votes
4 answers
320 views

How can multiline lambdas be designed in indent based languages?

How can multiline lambdas be designed in indent based languages? In Go, language with curly brackets, I will write multiline lambdas like this: ...
nchistov's user avatar
  • 1,585
4 votes
1 answer
94 views

Context-free grammar for a language where indentation marks code blocks?

I have the following context-free grammar: ...
mousetail's user avatar
  • 8,111
27 votes
13 answers
2k views

What are the drawbacks of using indentation for code blocks?

I'm not aware of any language other than Python that uses indentation to denote code blocks. To me, it seems like the simplest way to indicate blocks, and it also encourages proper formatting by ...
Someone's user avatar
  • 379