As an aside, it's interesting that GitHub as added support for Swift language detection so quickly, yet I frequently read stories (on HN too) about their passiveness to correct or add other (sometimes more) popular languages.
Swift uses the .swift extension, which is pretty unique, so detection is as simple as checking for the file extension with a very low risk of a bad classification.
Some of the older, more popular languages uses more common file-suffixes, which may be shared between multiple programming languages, which has a negative impact on classification accuracy.
I added Game Maker Language, for example.