Comment on Tabs are objectively better than spaces - gomakethings.com
FlagonOfMe@sh.itjust.works 1 year agoinevitably 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?
stevecrox@kbin.social 1 year ago
Parameter declarations, array initialisation and lambda alignment is the most common.
Java Lambda expressions can be hundreds of characters long so wrap on to the next line. A lot of code formatters will auto wrap with a single identation.
A lot of developers instead like to align each lambda call with the one above. They feel its more readable, personally I agree.
Normally in DevSecOps I offer a standard code format to a team, I highlight the contentious choices (like spaces or tabs) and ask the team if they have strong feelings about it and then sit back and let them decide.
My only thing is ensuring you don't mix tabs and spaces.
BatmanAoD@programming.dev 1 year ago
What did you mean by “inevitably there are times when you need to use spaces”, then?