Compiling Scala to Python as a new platform for data engineering and AI

I would love this to happen.
I was trying out Scala, F# and some other languages some time ago and eventually went with F# because of their awesome transpiler project Fable (https://fable.io/).

Not only does it transpile to JS, but also TS and Python with type hints.

It has been sooo useful for me in the following aspects:

  • I do not like Python and TS that much but their ecosystems are very hard to beat. It allows me to have the best of both worlds: an expressive and safe lang with huge lib that I can just leverage.
  • I can focus on learning the language (F#, Scala, etc.) instead of learning both the language and their ecosystems. Being able to continue using all the lib I already know in the target ecosystem (e.g. zod in TS for validation, numpy and pandas for data stuff in python) allow me get productive and hand-on during the learning/transition.
  • Similar story on the tooling side. I for example, haven’t got time to learn the FsUnit/whatever the setup for .net, but it is fine, I just can use pytest.

(A bit more background, I am doing/learning DDD style. So I have most of the core logic in F#, which then call some “platform” code written in python.)

5 Likes