Why the love for tabs

Hey Ben,

When watching your tutorials you make the point multiple times to use tabs and not 4 spaces. Why? Is this something beyond the age old tab vs spaces argument? For example will Unreal not parse your code correctly if tabs are not use?

Just wondering because I find it odd that you make a direct call out to use tabs when according to the C++ standard it makes no difference. Also I am a VI coder so I HATE using tabs because they make my curser bounce around like it is on crack :stuck_out_tongue:

-Chris

My assumption is he wants everyone’s code to look similar, and the whole “tabs vs spaces” is an argument of semantics. He isn’t here to teach semantics, but Unreal, so he made the choice for us. It might be as simple as that, and usually is because programmers like to bicker about the most inconsequential things : p.

Probably a tab is more efficent while typeing and many ides and codeing programs work are are used to tabs as a standard space fro readability.

Using tabs vs. spaces is quite old topic among programmers :slight_smile:
There is 1 major concern - whatever style you choose, stick to it while working on one project. Mixing tabs and spaces might lead to unreadable code, as displaying those in different Editors/IDE may differ due to one’s settings.
In this course though, we use tabs as far as it’s mentioned in UE4 Coding Style Guide.

Best regards.

Privacy & Terms