
Google Swift Style Guide - dkmar
https://google.github.io/swift/
======
weiming
Is there any data on Swift adoption among the popular apps/companies? E.g.
last I remember hearing, Facebook was still on ObjC/C++, but Uber has gone all
in.

One use at Google is internal tools according to this post:
[https://news.ycombinator.com/item?id=15701107](https://news.ycombinator.com/item?id=15701107)

~~~
foobarbazetc
We’re medium sized and our iOS app is something like 200k+ LOC of Objective-C.
We started our rewrite (where we replace each .m with a .swift) when 4.0
became available.

It’s been nice because Obj-C is a terrible language, but the worst thing about
Swift (so far) is value types for collections. Just a terrible idea with no
real benefit as far as I can see (someone will say COW something something
concurrency something. But nothing concurrent is provided and all the code out
there is just giant locks on base collection types. java.util.concurrent.* is
unmatched)

------
brazzledazzle
Someone made a comment and deleted it that I’ll reply to here for them. One of
their complaints was about spaces vs tabs and having to smash arrow keys.

I’m about to blow your mind (definitely blew my mind ages ago when I first
learned about it):

Windows/Linux: Ctrl+arrow

Mac (rarely apps do ctrl but usually you can remap): Alt+arrow

This jumps words and will let you get around your lines much, much faster.

Of course vim or vim plug-ins would be useful to learn too, but you shouldn’t
need to learn a whole new paradigm to navigate more efficiently.

~~~
qop
I share this at work every now and then and I'm always shocked people never
tried it. Seems obvious to me.

------
himom
[https://github.com/kciter/awesome-style-
guide/blob/master/RE...](https://github.com/kciter/awesome-style-
guide/blob/master/README.md#swift)

------
tempodox
The nice thing about style guides is that there are so many of them to choose
from.

------
melling
I don’t suppose there’s an Xcode/AppCode plug-in that handles most of this
automatically, or with warnings?

Personally, I think every language should include its over version of gofmt.

~~~
8chen
SwiftLint is a popular choice

