This file has been truncated. show original
# Why *Swift* for TensorFlow?
* Date: April 2018
The core [graph program extraction algorithm](GraphProgramExtraction.md), [automatic differentiation](AutomaticDifferentiation.md), and [Python language interoperability](PythonInteroperability.md) features of Swift for TensorFlow can be implemented for other programming languages, and we are occasionally asked why we didn’t use some other one for this project.
The engineers on the project were previously familiar with Swift (and several other languages), but the choice was guided by the goals of our project, which imposed specific technical requirements (explained below). This choice was also discussed extensively, debated with coworkers and other interested engineers, and we concluded that Swift was the best direction. In this document we're sharing our deliberation process with the community to help explain our decisions.
That said, while our choice of language was guided by our specific project goals, we would love to see wider application of these techniques and ideas in the context of other programming languages! If you are interested in pursuing a similar project, please reach out to us and we will happily share our expertise.
### How we got here
As discussed in the [design overview document](DesignOverview.md) our project goal is to improve usability of TensorFlow. We quickly realized that our core [static analysis-based Graph Program Extraction algorithm](GraphProgramExtraction.md) would not work well for Python given its highly dynamic nature. This led us down the path of having to pick another language to work with, and we wanted to approach this methodically. As such, we defined goals for the project, explored which properties of a programming language are important to achieve those goals, and then evaluated a lot of languages against these properties. You already know the outcome--we eventually settled on Swift.
Below we explain [our project goals](#project-goals), discuss the [programming language properties](#properties-of-programming-languages) that contribute to these goals, provide a short [evaluation of specific languages](#which-languages-fit-our-project-requirements) against those goals, and discuss the [pros and cons of Swift](#evaluating-swift-against-our-language-properties) specifically.
## Project goals
TensorFlow is a world-class machine learning framework used by a wide range of different people for lots of different things. Our project goal is to provide a new interface to TensorFlow that builds on TensorFlow’s power and capabilities, while taking its usability to a whole new level. Our aim is to make machine learning researchers (both theoretical and applied), production engineers deploying at scale, and anyone else using TensorFlow more productive and joyful without sacrificing anything that already makes TensorFlow great.