Scala to Swift converter