Re:Roc – A fast, friendly, functional language
by Eji1700 on Monday November 20, 2023 @02:36PM
(#38353304)
I glanced at the example code and it looked like it allowed side effects, but maybe I was wrong. I haven't had much time to mess with it and seemed to be able to hard crash the repl doing some testing so it's something i'll have to look at later.
Re:Roc – A fast, friendly, functional language
by ReleaseCandidat on Monday November 20, 2023 @02:41PM
(#38353385)
Well, yes, if there are no type annotations because all types are inferred, you don't see the effect "types".
Re:Roc – A fast, friendly, functional language
by Eji1700 on Monday November 20, 2023 @03:45PM
(#38354445)
Then to my limited understanding that's less "pure" than haskell isn't it, which doesn't allow side effects and thus forces monads?
Re:Roc – A fast, friendly, functional language
by whizzter on Monday November 20, 2023 @04:15PM
(#38354898)
Honestly it looks like basically the same as getline/putStrLen from the tutorial(1) in the link below, just not written in an intentionally obtuse language.
Considering how much more approachable this Roc documentation/naming is, I'm wondering if it isn't so that the people writing Wikipedia's math pages are probably the same people that are drawn to and writes Haskell/monad "tutorials".
I'm sorry, but what do you mean by that? Roc is "as" pure as Haskell (or Koka), if that's your point.