Swift Style Guide by GitHub
github.com
Swift Style Guide by GitHub
1–10 of 52 posts
Re: Swift Style Guide by GitHub
#2Re: Swift Style Guide by GitHub
#3Lost me at "Tabs, not spaces." :p
- only press a single key instead of tapping 2 or 4 times.
- alter their width within your IDE to suit your preferences.
- they are "designed" to intent a piece of text with unlike spaces which are "designed" to break words.
But use whatever you like as long as it's consistent :)
Re: Swift Style Guide by GitHub
#4Lost me at "Tabs, not spaces." :p
Tabs beat spaces in every single way; - only press a single key instead of tapping 2 or 4 times. - alter their width within your IDE to suit your preferences. - they are "designed" to intent a piece of text with unlike spaces which are "designed" to break words. But use whatever you like as long as it's consistent :)
Re: Swift Style Guide by GitHub
#5Are you kidding? You just added one. De gustibus non est disputandum.
Re: Swift Style Guide by GitHub
#6Lost me at "Tabs, not spaces." :p
Tabs beat spaces in every single way; - only press a single key instead of tapping 2 or 4 times. - alter their width within your IDE to suit your preferences. - they are "designed" to intent a piece of text with unlike spaces which are "designed" to break words. But use whatever you like as long as it's consistent :)
I would add "as long it's consistent with the codebase and the practices of the project"
Mixing tabs and spaces in a project is very unpleasant and changing one for the other wreaks havoc in the blame functionality
Re: Swift Style Guide by GitHub
#7Lost me at "Tabs, not spaces." :p
Tabs beat spaces in every single way; - only press a single key instead of tapping 2 or 4 times. - alter their width within your IDE to suit your preferences. - they are "designed" to intent a piece of text with unlike spaces which are "designed" to break words. But use whatever you like as long as it's consistent :)
Re: Swift Style Guide by GitHub
#8Lost me at "Tabs, not spaces." :p
Tabs beat spaces in every single way; - only press a single key instead of tapping 2 or 4 times. - alter their width within your IDE to suit your preferences. - they are "designed" to intent a piece of text with unlike spaces which are "designed" to break words. But use whatever you like as long as it's consistent :)
- Every single text editor that's come after notepad.exe has had automatic tab/space conversion. Pressing tab inserts N spaces, pressing backspace un-indents N spaces, etc.
- In some languages, this is not a feature. 2-character tabs, using two tabs to indent for alignment:
var myVar = 1,
otherVar = 2,
anotherVar = 3;
Opened later in an editor using 4-character tabs: var myVar = 1;
otherVar = 2,
anotherVar = 3;
- {}[] and more aren't used for anything close to their original literary intent.Re: Swift Style Guide by GitHub
#9> Fewer debates about aesthetics Are you kidding? You just added one. De gustibus non est disputandum.
Re: Swift Style Guide by GitHub
#10Earlier quoted context omitted.
Tabs beat spaces in every single way; - only press a single key instead of tapping 2 or 4 times. - alter their width within your IDE to suit your preferences. - they are "designed" to intent a piece of text with unlike spaces which are "designed" to break words. But use whatever you like as long as it's consistent :)
We really shouldn't get into this, but I can't help myself. - Every single text editor that's come after notepad.exe has had automatic tab/space conversion. Pressing tab inserts N spaces, pressing backspace un-indents N spaces, etc. - In some languages, this is not a feature. 2-character tabs, using two tabs to indent for alignment: var myVar = 1, otherVar = 2, anotherVar = 3; Opened later in an editor using 4-charac…