r/functionalprogramming • u/Voxelman • Feb 15 '24
Question Scripting language like Python, bur with the feeling if Rust
Rust is a great language, but sometimes I wish to have something more like Python, but with a more "Rusty" feeling.
With "Rusty" feeling I mean project management with cargo, Error Handling with Result/Option, pattern matching, strong static typing with type inference, immutability by default and so on.
This means, I'm searching for a functional programming language. My problem is, that all functional languages I found until now compile to something intermediate like Beam, JVM, .NET, JS or build binaries like Haskell.
What I'm looking for is a scripting language like Python. Just an interpreter, that runs a script, but with the "if it compiles, it runs" experience of Rust. And yes, I know that compile time type checking and script interpreter are different kind of shoes, but who knows...
Any idea?
Thanks for all the comments. A lot of good suggestions, but I decided to go with F#. I think it comes closest to Python. It runs on Linux and Windows, can run in a Jupyter like notebook and has a nice syntax. I have some (rudimentary) experience and the book "domain driven design made functional" from Scott Wlaschin, which I really like. It is well documented and you can find lots of books, tutorials and videos. Languages like Mojo lack documentation.
It is not as "Rusty" as I would like, but close enough. So if someone is searching for an alternative to Python, try F#
View all comments
Show parent comment
3
u/met0xff Feb 17 '24
Well I just said that I hope for it. I don't know what you do but I am in Machine Learning and for me Windows hasn't been a (work) topic for almost a decade now. So for me it's almost more realistic to write something with the Mojo preview for my work than getting anybody on board with .net ;).
I actually recently heard another team at my company was using Clojure for a few years but at some point they decided to drop it.