Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I fully agree. F# is my favorite language, and it almost feels like a statically typed Scheme at times, just with built-in pattern matching and pipes thrown in. It's a really great way to program, and it's easy to go imperative or OOP when needed without friction.

The only thing missing from F# is an Elixir/Erlang/OTP-like process system (`MailboxProcessor` is pretty good though), but then again, every language except Elixir/Erlang/OTP is missing that.



I am not further enough in my F# journey to have tried this, but you could technically pair it with orleans for actor oriented systems ?

Love the language though I have spent only a week working with it. It seems to have a lot of things I liked in Kotlin.


F# does have the `MailboxProcessor`. It is quite simple and capable.

https://fsharp.github.io/fsharp-core-docs/reference/fsharp-c...

https://fsharpforfunandprofit.com/posts/concurrency-actor-mo...

I haven't looked at Orleans in a while. Last time I did, I came away with the viewpoint that it was very much designed to have a C# interface, which while manageable in F#, doesn't really provide for an idiomatic F# experience. I'm also not too sure, but I think it basically requires a cloud or distributed environment. Can it just be run on a local computer?

But even the `MailboxProcessor` doesn't do what Elixir and Erlang do on top of the BEAM VM. An instance of a BEAM VM is a single OS process, but the BEAM can handle millions of Erlang processes, which are not OS processes or even threads. They are their own thing that are extremely lightweight. The BEAM scheduler is very nice as well, such that it switches among all the running processes.

Even though I develop in Elixir, I am not yet a BEAM expert. So before I say something incorrect, I recommend taking a look at the talk The Soul of Erlang and Elixir by Sasa Juric.

https://www.youtube.com/watch?v=JvBT4XBdoUE

It fully encapsulates and describes what makes processes so special in Elixir and Erlang.

There is the Gleam language, which is a statically typed language on the BEAM VM. However, they moved away from the ML-dialect syntax, which is unfortunate.


... and also Caramel which is a Ocaml/Reason dialect so you get to keep the Ocaml syntax

I have never tried it though

https://caramel.run/manual/introduction.html


Maybe one day Fable will add an Erlang backend.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: