My personal Farewell to Scala

Saying goodbye to Scala after years of use! In this post, I reflect on its strengths and share why I’m transitioning to Python for my new role. Learn how Python’s simplicity, data ecosystem, and flexibility make it the perfect fit for my next chapter.

My personal Farewell to Scala
Photo by Kushal Rajkarnikar / Unsplash

After years of working with a mix of Scala and Python, I am moving to 100% Python.

Scala has been a significant part of my engineering journey, shaping my perspective on software development and offering unique strengths that made it a joy to use. However, with my new job, I’m transitioning to Python as my primary language. Here’s a reflection on my journey with Scala and why I’m embracing Python for what’s next.

Scala: Why It Shines

Scala is a brilliant language that blends object-oriented and functional programming paradigms. Its seamless interoperability with Java, robust type system, and ability to write expressive, concise code makes it powerful for building scalable, maintainable systems.

I've used Scala in its bare metals with Spark, and without using frameworks like Akka and libraries such as Cats I have developed such an interest and excitement for strong typed languages. Working in Scala also introduced me to functional programming concepts like immutability, higher-order functions, and monads, all of which transformed how I think about clean, testable code.

Python: the [now] greatest

While Scala’s strengths are undeniable, its use is diminishing. On the other hand, Python is now the top programming language on Github, surpassing 'the giant' Javascript. Python has something great: its learning curve is exponential while the others are logarithmic.

And you can't deny it:

  1. Simplicity and Readability: Python’s simplicity allows for faster iteration and easier onboarding for new developers, making it ideal for teams prioritizing agility.
  2. Ecosystem for Data and AI: There is a big AI community around python, data engineering and machine learning. Python dominates these domains with libraries like Pandas, NumPy, TensorFlow, and PyTorch. Even on big data, where you can easily say 80% of spark applications are made on pyspark.
  3. Community and Resources: Python’s vast community and extensive resources especially for tasks like deploying quick prototypes or integrating with third-party tools is amazing. In addition, the Python Software Foundation are making right decisions on each version.

What I’ll Miss About Scala

Leaving Scala means parting ways with:

  • Type Safety: Python’s dynamic typing feels liberating for quick experimentation but lacks the guarantees that Scala’s static typing provides. Mypy is something that I will definitely use, but you'll always can cheat as you could do on Solitaire.
  • Performance: Scala’s ability to compile to bytecode and leverage the JVM’s performance optimization is unparalleled in Python’s interpreted world. But If you are switching from CPU tasks to I/O tasks, then this is less critical.
  • Functional Programming: The perfect blend between FP and OOP in this language was something that I liked a lot. Having the best of both worlds and write great and intuitive applications was something that I always enjoyed.

Moving Forward with Python

Transitioning to 100% Python doesn’t mean forgetting the lessons Scala taught me. Instead, I see it as an opportunity to apply functional programming principles, thoughtful architecture, and scalability practices in a new context.

Right now, I am in love with Clean Architecture, more specifically Hexagonal Architecture - definitely a new post will come about this soon - and I can't wait to apply those great principles on the Python applications that I am going to work on the following months.

This change also allows me to explore Python’s strengths, especially for data-intensive workflows, while continuing to advocate for best practices honed from years with Scala.

Scala will always hold a special place in my heart for the depth it brought to my programming skill set. While this farewell is bittersweet, I’m excited about the possibilities Python offers in my new role.

For those navigating similar transitions, my advice is not to rely on just one language; they are tools, and adaptability is key to thriving in our ever-evolving industry. Even python needs C++, or more recently Rust.

The right tool, for the right job.