DEV Community

Discussion on: Moving away from ReactJs and VueJs on front-end using Clean Architecture

Collapse
tiptronic profile image
Andy Fuchs • Edited on

I could not more disagree on spacing. Although it's always a personal preference - I prefer 4-chars spacing, as it makes the code much better readable

Collapse
mfpopa profile image
Mihail

I used to believe that 4-5 years ago. It's about what you are used to. If you start using 2-space indentation you'll get used to it and you'll also notice that you can still make the argument that the code is more readable this way because you can now see more code on each line, which count especially when you have multiple levels of nested code.

Thread Thread
tiptronic profile image
Andy Fuchs

I solve this by using a larger display ;) and I doubt 2-space indentatioin lets you see 'more code on each line' in ~99% of all cases. While 4-space indentation let's you much better see where functions/declarations start/end and what belongs together (no matter how long lines are).

Thread Thread
mfpopa profile image
Mihail

Yeah, in most cases lines are short enough that it does not matter. But my point is still that indentation is a matter of preference or what you get used to. For me it's much easier to read 2-space indentation because it's what I'm used to. I find that it's easier to traverse the code because it feels closer together.