C Indentation Style Poll

I was wondering, what about YAML syntax ? is it considering in the same boat ?
I’m asking because this syntax is used at EndeavourOS…

Oops, I put it in the Lounge, feel free to move it somewhere else.

This is mostly applicable to C, and C-style languages that use { and } for code blocks. I’m not sure how YAML fits in this.

Lounge why not if you feel it there.
In adding the both could give more choices for those who use them but I’m not sure if you could modify it !

6- Spits hex machine code without spaces
7- YAML Syntax

image

4 Likes

1 and 2 are both fine with me. The others just seem a little… contrived, almost?.. in comparison.

If it comes to me, else does not need two lines.

  ...
} else {
  ...
1 Like

I wonder if it comes down to how much you use code folding? Or maybe which languages you used earliest. At least, once you get past byte-packing in BASIC!

Whitesmiths seems to be most consistent with ‘structure’ - as in a structured language (as it was defined back then) - see Pascal and Modula 2. Think blocks bounded by begin and end, and written cohesively. GNU style seems to be influenced by Lisp programming, with reason I understand (Stallman). Allman makes logical sense, while remaining pretty readable. And we all should give thanks that a style wasn’t built on ADA!