So instead of:
["a", "b", "c"] |> List.append "d" |> List.append "e" |> List.append "f"
You could have:
["a", "b", "c"] |> append "d" |> append "e" |> append "f"
Since Roc knows that the type returned from each function is a List.
171–180 of 180 posts
So instead of:
["a", "b", "c"] |> List.append "d" |> List.append "e" |> List.append "f"
You could have:
["a", "b", "c"] |> append "d" |> append "e" |> append "f"
Since Roc knows that the type returned from each function is a List.
Since the type is inferred, why can't the module name by convention be inferred from the data type in pipe operations? So instead of: ["a", "b", "c"] |> List.append "d" |> List.append "e" |> List.append "f" You could have: ["a", "b", "c"] |> append "d" |> append "e" |> append "f" Since Roc knows that the type returned from each function is a List.
An important note is that any module could expose an append function that has the same interfaces as `List.append`, so that could easily lead to confusion.
Has anyone else noticed that functional languages go heavy on the special keywords and operators? It feels like theres a larger cognitive load (more specific keywords to memorize) when learning languages like F# or OCaml compared to C or Python or Java
I do agree that default convention may rely heavily on a few syntaxes that aren't as common in procedural or OO languages.
Roc is definitely interesting and I like the platforms idea. The error messages are clear, but calling them friendly is clearly not something they've reached yet. Just installing and trying to reach a valid hello world going just by the errors and it's actively rude within three error messages. Also it's missing the final newline
Can you share those error messages? I am sure that is not the intent.
Roc looks great, props to everyone involved in designing this language! Is there an (C) FFI planned?
0. I don't see type annotations. 1. Why another language and not a better runtime for an existing language with an install base that already exists?
Earlier quoted context omitted.
Well, yes, if there are no type annotations because all types are inferred, you don't see the effect "types". https://www.roc-lang.org/tutorial#tasks
Then to my limited understanding that's less "pure" than haskell isn't it, which doesn't allow side effects and thus forces monads?
Is it a Haskell/Elm thing I’m unfamiliar with?
Earlier quoted context omitted.
Seriously ppl, go use a language where the creator is a paradigm of humanity. Maybe Python is a good choice? Seriously, tho, that's the comment that "made the Elm community a hostile and unwelcoming place" and is still being dredged up after 5 years? That comment can barely even be considered harsh, and is nowhere near hostile. Is it really worth tearing down someone's life, monitoring the internet for any time their…
A paragon of humanity?