Swift can make your life easier than that. When closure body consists of only one expression, the return keyword can be omitted. So, the new version of sort function will be like this:
names.sort({ str1, str2 in str1 > str2})