▲ 1320 ▼ The lengths we have to go to (sh.itjust.works) submitted 2 years ago by alphacyberranger@sh.itjust.works to c/programmer_humor@programming.dev 124 comments fedilink hide all child comments
[–] mexicancartel@lemmy.dbzer0.com 5 points 2 years ago (1 child) Use TABS guys TABS. permalink fedilink source parent hideshow 2 child comments replies: [–] AntEater@discuss.tchncs.de 2 points 2 years ago (2 children) Tabs suck. Use a real editor and spaces work fine. permalink fedilink source parent hideshow 4 child comments replies: [–] mexicancartel@lemmy.dbzer0.com 3 points 2 years ago (1 child) Why tabs suck? Explain. Tabs are neat. Does you app have too many nested functions? Use tab width = 2 Do your app have too less nested functions? Use tab width = 8 Is your app having average number of nested fns? Use tab width = 4(mostly default) And all theese can happen without modifying a single byte in the source file, unlike spaces! permalink fedilink source parent hideshow 2 child comments replies: [–] merc@sh.itjust.works 5 points 2 years ago (1 child) Except that you have to either indent with only tabs or indent with only spaces. Any time you mix tabs and spaces you are just asking for disaster. If you indent with only tabs you can't align things except on tab boundaries. If you have a function that takes 10 parameters and want to do it on multiple lines, the alignment of the extra parameters is going to be ugly. If you indent with only spaces, you can indent things so that all the parameters line up directly underneath the parenthesis, for example. permalink fedilink source parent hideshow 2 child comments replies: [–] mexicancartel@lemmy.dbzer0.com 1 point 2 years ago (1 child) I agree we shouldn't mix tabs with spaces. But use tabs always. I could line up parameters together but may not be just under parentheris, and it looks good and readable for me permalink fedilink source parent hideshow 2 child comments replies: [–] merc@sh.itjust.works 1 point 2 years ago I think it looks like ass, so only spaces for me. permalink fedilink source parent [–] PreachHard@mander.xyz 1 point 2 years ago* Yeah who tf isn't using tabs as spaces, it isn't 2010 permalink fedilink source parent
[–] AntEater@discuss.tchncs.de 2 points 2 years ago (2 children) Tabs suck. Use a real editor and spaces work fine. permalink fedilink source parent hideshow 4 child comments replies: [–] mexicancartel@lemmy.dbzer0.com 3 points 2 years ago (1 child) Why tabs suck? Explain. Tabs are neat. Does you app have too many nested functions? Use tab width = 2 Do your app have too less nested functions? Use tab width = 8 Is your app having average number of nested fns? Use tab width = 4(mostly default) And all theese can happen without modifying a single byte in the source file, unlike spaces! permalink fedilink source parent hideshow 2 child comments replies: [–] merc@sh.itjust.works 5 points 2 years ago (1 child) Except that you have to either indent with only tabs or indent with only spaces. Any time you mix tabs and spaces you are just asking for disaster. If you indent with only tabs you can't align things except on tab boundaries. If you have a function that takes 10 parameters and want to do it on multiple lines, the alignment of the extra parameters is going to be ugly. If you indent with only spaces, you can indent things so that all the parameters line up directly underneath the parenthesis, for example. permalink fedilink source parent hideshow 2 child comments replies: [–] mexicancartel@lemmy.dbzer0.com 1 point 2 years ago (1 child) I agree we shouldn't mix tabs with spaces. But use tabs always. I could line up parameters together but may not be just under parentheris, and it looks good and readable for me permalink fedilink source parent hideshow 2 child comments replies: [–] merc@sh.itjust.works 1 point 2 years ago I think it looks like ass, so only spaces for me. permalink fedilink source parent [–] PreachHard@mander.xyz 1 point 2 years ago* Yeah who tf isn't using tabs as spaces, it isn't 2010 permalink fedilink source parent
[–] mexicancartel@lemmy.dbzer0.com 3 points 2 years ago (1 child) Why tabs suck? Explain. Tabs are neat. Does you app have too many nested functions? Use tab width = 2 Do your app have too less nested functions? Use tab width = 8 Is your app having average number of nested fns? Use tab width = 4(mostly default) And all theese can happen without modifying a single byte in the source file, unlike spaces! permalink fedilink source parent hideshow 2 child comments replies: [–] merc@sh.itjust.works 5 points 2 years ago (1 child) Except that you have to either indent with only tabs or indent with only spaces. Any time you mix tabs and spaces you are just asking for disaster. If you indent with only tabs you can't align things except on tab boundaries. If you have a function that takes 10 parameters and want to do it on multiple lines, the alignment of the extra parameters is going to be ugly. If you indent with only spaces, you can indent things so that all the parameters line up directly underneath the parenthesis, for example. permalink fedilink source parent hideshow 2 child comments replies: [–] mexicancartel@lemmy.dbzer0.com 1 point 2 years ago (1 child) I agree we shouldn't mix tabs with spaces. But use tabs always. I could line up parameters together but may not be just under parentheris, and it looks good and readable for me permalink fedilink source parent hideshow 2 child comments replies: [–] merc@sh.itjust.works 1 point 2 years ago I think it looks like ass, so only spaces for me. permalink fedilink source parent
[–] merc@sh.itjust.works 5 points 2 years ago (1 child) Except that you have to either indent with only tabs or indent with only spaces. Any time you mix tabs and spaces you are just asking for disaster. If you indent with only tabs you can't align things except on tab boundaries. If you have a function that takes 10 parameters and want to do it on multiple lines, the alignment of the extra parameters is going to be ugly. If you indent with only spaces, you can indent things so that all the parameters line up directly underneath the parenthesis, for example. permalink fedilink source parent hideshow 2 child comments replies: [–] mexicancartel@lemmy.dbzer0.com 1 point 2 years ago (1 child) I agree we shouldn't mix tabs with spaces. But use tabs always. I could line up parameters together but may not be just under parentheris, and it looks good and readable for me permalink fedilink source parent hideshow 2 child comments replies: [–] merc@sh.itjust.works 1 point 2 years ago I think it looks like ass, so only spaces for me. permalink fedilink source parent
[–] mexicancartel@lemmy.dbzer0.com 1 point 2 years ago (1 child) I agree we shouldn't mix tabs with spaces. But use tabs always. I could line up parameters together but may not be just under parentheris, and it looks good and readable for me permalink fedilink source parent hideshow 2 child comments replies: [–] merc@sh.itjust.works 1 point 2 years ago I think it looks like ass, so only spaces for me. permalink fedilink source parent
[–] merc@sh.itjust.works 1 point 2 years ago I think it looks like ass, so only spaces for me. permalink fedilink source parent
[–] PreachHard@mander.xyz 1 point 2 years ago* Yeah who tf isn't using tabs as spaces, it isn't 2010 permalink fedilink source parent