[Swift-devel] Code style

Ben Clifford benc at hawaga.org.uk
Tue May 14 15:28:02 CDT 2013


oh i can argue this all night.

> > If someone wrote some code with tab = 4, and committed it, and someone 
> > else wrote code with tab = 8, maybe even in the same file, there is no 
> > consistent value to use.
> 
> A tab is a tab. You can't write a file with both 8 space tabs and 4
> space tabs. You can however write a file with 8 space indentations vs. 4
> space indentations if you don't use tabs exclusively.

Person A commits some code with a single tab indent.
Person B has their display set to tab = 8 and adds new lines with 8 spaces 
rather than using the existing indentation byte sequence.
Person C has their display set to tab = 4 and adds new lines elsewhere in 
the file with 4 spaces, rather than using the existing indentation byte 
sequence.

Now you have a file with both 8 space tabs and 4 space tabs.

it seems hardest of all to stop people using their own favourite 
indentation sequence rather than the pattern already used. (make tabs and 
spaces have different colours and a bunch of the communally edited code I 
work with looks pretty puke)

-- 




More information about the Swift-devel mailing list