Computers Speak English? Chinese Swift on the Rise
Note: Hacked has discovered since publishing this article that the original reporting from Bloomberg was inaccurate. The Swift documentation was translated, not the programming language. A blunder to be sure. Due to the oversight, John O’Mara will be following up in detail, to include attempting to acquiring an official statement from Apple. -Editor
Just as Arabic numerals became the de facto standard in the modern world, English has been the primary language of computer programming since its popularization. Now Apple’s newest programming language Swift has been translated to Mandarin Chinese in an open source project to help Mandarin speakers program applications for Mac OS and iOS. Will this set a new precedent for native language programming?
Throughout the history of high-level programming languages, English has been used to simplify the task of creating software by abstracting the machine code (the native language of the computers) with increasing complexity. While many programming languages share simple terminology such as ‘while’, ‘if’ and ‘else’, as programming languages and their associated frameworks have evolved with the increasing capabilities of the hardware they’re instructing that English vocabulary has expanded considerably. If we take a quick look at an example of Swift code it shows just how helpful knowledge of the English language would be for a programmer using it:
All the non-teal colored text in that code is part of Swift and its Sprite Kit framework. Clearly the terminology lends a great deal from English. Even without knowledge of software development, English speakers will be able to see at a glance what parts of the code is doing. In general, software for Apple’s ecosystem is programmed in their development app Xcode. With use of features such as auto-complete, knowledge of English is doubly useful. You can scroll through huge lists of functions some of which are named after their obvious purposes, or read built in documentation in Xcode.
Will Chinese Swift See Popular Adoption?
Translating Swift in to Mandarin is a great first step in making it easier for millions of people to program for Apple platforms… But this isn’t the first time a language has been translated for Chinese. AppleSoft BASIC was translated for Apple II clones, and Python has been translated in to Chinese, although an English speaking Chinese friend tells me it doesn’t read too easily, as a result of the translation, and ChinesePython is not 100% compatible with regular Python distributions, though English Python code will run on an installation of ChinesePython.
It remains to be seen whether Apple will include support for the project in Xcode, but given that Apple’s operating systems are closed source it should be protected to some extent from a degree of that fracturing of support. Swift programmed in Chinese still has to compile using Apple’s software development kit. But it would fracture developers, to some extent, who are aided greatly by the open source software available on the internet. I’ve personally read examples of English Swift and other programming languages surrounded by Chinese text of which I have no understanding, but been able to see where I’ve been going wrong from the code.
Only time will tell whether high-level programming will see widespread adoption in non-English languages. Given popular programming languages originating in non-English speaking nations have used English terminology (such as Python and Ruby) and that North Korea uses a modified distribution of Linux which relies heavily on English language codebases such as Firefox, Wine and KDE 3, we can at least say it’s not an easy task to accomplish on a budget or without popular support. However, Apple and China both have significant resources to work with, so I’ll be watching with great interest to see whether Chinese Swift gains traction.
Images from Shutterstock.