Live data from Hacker News

Swift Style Guide by GitHub

github.com

51–52 of 52 posts

Re: Swift Style Guide by GitHub

#51

What does Github write that uses Swift? I thought they didn't have an iOS app and I figured their desktop app was some node-webkit or electron based thing based on it being 27mb download.

The desktop app contains lots of Objective-C and Swift code. You can check it using `otool -o` on the binary to dump the __OBJC segment, or by opening it in Hopper.

Re: Swift Style Guide by GitHub

#52

I'm not so sure about "Make liberal use of vertical whitespace to divide code into logical chunks." — it's my tendency to add a lot of vertical whitespace as I write code, but the more I go back and remove it, the more I'm convinced that it wasn't really helpful and that whatever little help it did provide was far outweighed by how much less context could be seen on the screen at one time. I think of it kind of like…

Exactly right. The smallest unit of logical division in code is the function. It's not meaningless whitespace. Some programmers seem to like whitespace, but it's a purely aesthetic preference. No more or less.
Post reply on HN