Remix.run Logo
lmm 11 hours ago

You might like Scala. It has much of the good parts of OCaml or F#, but also lets you write imperative code freely when you want. The `for`/`yield` syntax for async is very nice IMO, or you can write Javascript-like promise chaining directly if you want.

lanthissa 2 hours ago | parent | next [-]

Scala is great, nearly all of its constructs were right and right early. Kotlin/Java catching up before it got popular kinda nixed its growth and at this point i dont see it being chosen for new projects.

Gleams a nice one too if you want pure functional, small community though.

switchbak 10 hours ago | parent | prev [-]

Some interesting things happening in the structured concurrency / "Direct style" space. It looks like it could become a powerful and readable way to compose (asyncy type) things. Simpler code, usable stack traces, better traceability, less function colouring concerns.

It's early days in that regard, with some folks doing some really interesting things: Odersky himself / the Ox project.

edwintorok 6 hours ago | parent [-]

With OCaml 5 and effects it might be possible to use direct style, and rely on effect handlers to schedule IO. Here is an example of how structured concurrency in OCaml could look like https://ocaml.org/p/picos_std/latest/doc/Picos_std_structure...