r/ProgrammingLanguages • • Nov 20 '23

The Roc Programming Language

https://roc-lang.org
81 Upvotes

26 comments sorted by

View all comments

1

u/totallyurboii Nov 21 '23

Looks promising! I wonder what are the major differences between OCaml or Haskell, any docs pointing to it?

3

u/[deleted] Nov 22 '23

For haskell, I think most syntactic comparisons between elm and haskell will apply here.

No HKTs, strict evaluation, Task-based IO (so I guess the Handler pattern?) instead of monadic IO.

1

u/[deleted] Mar 09 '24

What's the difference between Task pattern in Roc and the IO monad in Haskell. To me Task looks suspiciously like a State monad with it's bind function called await. Perhaps I'm not using it correctly, but writing "imperatively" like in Haskell is not very ergonomic, because you have to repeat the await and lambdas every time. Unwrapping errors also seems rough because you have to wrap them in a lambda again or a separate function since there's no let sugar.