▲ 164 ▼ Tabs are objectively better than spaces - gomakethings.com (gomakethings.com) submitted 2 years ago by mac@programming.dev to c/programming@programming.dev 176 comments fedilink hide all child comments
[–] FlagonOfMe@sh.itjust.works 0 points 2 years ago (1 child) inevitably there are times you need to use spaces When? You indent with tabs then add any spaces you want for precise alignment. When would you need to use spaces to indent? permalink fedilink source parent hideshow 2 child comments replies: [–] stevecrox@kbin.social 5 points 2 years ago* (last edited 2 years ago) (1 child) Do not mix tabs and spaces. Its impossible to automate checking that tabs were only used for indentation and spacing for precise alignment. So you then take on a burden of manually checking You end up with the issue where someone didn't realise and space idented or anouther person used tabs for precise alignment and people forget to check the whitespace characters in review and it ends up going inconsistent and becoming a huge pile of technical debt to fix. Use only one, you can automate enforcement and ensure the code renders consistency. permalink fedilink source parent hideshow 2 child comments replies: [–] BatmanAoD@programming.dev 1 point 2 years ago* What did you mean by "inevitably there are times you need to use spaces", then? permalink fedilink source parent
[–] stevecrox@kbin.social 5 points 2 years ago* (last edited 2 years ago) (1 child) Do not mix tabs and spaces. Its impossible to automate checking that tabs were only used for indentation and spacing for precise alignment. So you then take on a burden of manually checking You end up with the issue where someone didn't realise and space idented or anouther person used tabs for precise alignment and people forget to check the whitespace characters in review and it ends up going inconsistent and becoming a huge pile of technical debt to fix. Use only one, you can automate enforcement and ensure the code renders consistency. permalink fedilink source parent hideshow 2 child comments replies: [–] BatmanAoD@programming.dev 1 point 2 years ago* What did you mean by "inevitably there are times you need to use spaces", then? permalink fedilink source parent
[–] BatmanAoD@programming.dev 1 point 2 years ago* What did you mean by "inevitably there are times you need to use spaces", then? permalink fedilink source parent