Python is Insufficient for Data Science! That’s Why Google has Swift – Analytics Insight


April 25, 2022


Will Google’s Swift for TensorFlow will end Python’s run? What does it mean for data science?

Python was released in the 1990s as a general-purpose programming language. Python’s rise in popularity has a lot to do with the emergence of big data in the 2010s as well as developments in data science, machine learning, and artificial intelligence. Businesses urgently required a language for quick development with low barriers of entry that could help manage large-scale data and scientific computing tasks. Python was well-suited to all these challenges. But despite the growing demand for machine learning and AI at the turn of this decade, Python won’t stay around for long. The emergence of newer programming languages such as Swift, Julia, and Rust actually poses a bigger threat to the current king of data science.

Swift for TensorFlow is arguably a technically superior system to what is available with Python because it uses automatic differentiation (AD) to generate novel static graphs and custom GPU code for different ML problems. There is a project for Python called Myia that aims to allow something similar, but it’s outside of the general Python workflow because Myia isn’t really Python, but a subset of Python that requires its own compiler to create Python extensions. Flux.jl for Julia is the only thing that I know of that is competitive with Swift in the area of AD.

Why Swift?

Swift is an open-source, easy, and flexible programming language developed by Apple for iOS and OS X apps. Swift builds on the best of C and Objective-C, without the constraints of C compatibility. It’s actually a friendly programming language for freshers because of its concise yet expressive syntax and lightning speed to run the apps.

Swift has recently started gaining traction among the data science community. It is highly endorsed by Jeremy Howard (’s co-founder). There are various libraries for performing tasks like numerical computation, high-performance functions for matrix math, digital signal processing, applying deep learning methods, building machine learning models, etc.

Top Swift Libraries for Data Science

  • Nifty (Demo): It is a general-purpose numerical computing library for the Swift programming language
  • Swiftplot: Swift library for Data Visualization
  • Swift for TensorFlow: A next-generation platform for machine learning
  •  Swift AI: It is a high-performance deep learning library written entirely in Swift

According to the official blog post by the TensorFlow team, “Swift for TensorFlow provides a new programming model that combines the performance of graphs with the flexibility and expressivity of an eager execution, with a strong focus on improved usability at every level of the stack”. Note that this isn’t just a TensorFlow API wrapper written in the Swift language. The team has added compiler and language enhancements to Swift with the aim of providing a top-notch user experience for data scientists and machine learning developers.


People use these languages for various purposes. Like how swift is perfect for developing software for the Apple ecosystem, Python can be primarily used for back-end development. While the performance of the Swift and Python vary, Swift is faster than Python.

When a developer is choosing the programming language to start with, they should also consider the job market and salaries. Comparing all this, you can choose the best programming language.

The fact of choosing Python or Swift for coding mostly depends on the purpose. If you are developing applications that will have to work on Apple OS, you can choose Swift. In case you want to develop your artificial intelligence or build the backend or create a prototype you can choose Python.

In conclusion, nobody is suggesting that Google is out there seeking to kill off Python, but it’s obvious that they have found the limits of the language for data science. Given their tremendous investment in machine learning, it makes sense that they would reach these limits before anyone else. The question really is how long until you too reach those limits?

More Trending Stories

Share This Article

Do the sharing thingy

About Author

More info about author

Spread the love

Leave a Reply

Your email address will not be published.