https://en.wikipedia.org/wiki/Draft:Roc_(programming_language)
This is a DRAFT ONLY, and has NOT been submitted for review to become the article.
It won't be submitted for review by me unless an expert fixes it up first, or signs off on it, which perhaps none of you have time for, and if so it won't get published and will get deleted, which is fine.
There are likely to be errors.
This is great! Thanks for taking the time to do this. I'd love to see Roc on Wikipedia soon :smiley:
Some comments;
"Roc's syntax is heavily influenced by Elm and roughly resembles ML-family languages. It uses indentation to define code blocks."
I think this was definitely the case for the original version -- the "new" compiler uses a syntax with parens and commas which looks less like Elm. I'm not sure how it would be described though.
- Pipelines: The
|>operator allows chaining function calls.
This has been deprecated in the new compiler, and now we use static dispatch.
Pattern Matching: The
when ... isconstruct
Also deprecated, the new syntax uses a match expression instead
Instead, it uses a
Resulttype
This has been renamed to Try
Maybe it would be better to leave these details out for now, and instead say the syntax has changed with the new compiler to improve the developer experience and compiler performance.
Thank you. I agree. If it hasn't been documented yet it's best to just omit these details.
I'm curious about the "Try" decision. Is the discussion for that publicly available, like in a Github issue?
See
Maybe not helpful now that it's been closed, but I love the Outcome suggestion :sweat_smile: or maybe Status.
I vote for Attempt (noun rather than verb, but also a verb)
I shouldn't have started a discussion about this here :smile: . Too late now! I think ideally the name of a multiple return type should describe all of the sub types. Ok and Err are both a status in my opinion, although one could also describe them as outcomes or results. I wouldn't call them attempts. But the other issue with attempt is the one you mentioned. It is also a verb and it still reminds me of try as in try catch (exceptions) and an imperative keyword rather than a type.
my sense is: we have an Attempt at an operation. the operation could succeed or fail. if it fails, knowing the specific failure out of a myriad of possible failures is useful. Operation ?
Try has been settled and implemented for a long time. I don't think we need to revisit it. :smile:
:smile: Understood sir.
Thanks for setting this up @riverstone :heart: Can I edit the article directly or should I suggest edits here on zulip?
@Anton Please do edit directly if you're willing! Thanks
Edit is done!
Do you want to do a final pass @Richard Feldman? It's pretty short.
Discussion of features etc. is about alpha4, I didn't want to mix in stuff that's in development
Thanks Anton. From my understanding, Richard deserves credit as the main designer in the infobox. We could put "and the Roc team" if their design involvement has been more than what is already implied by having "Roc Team" as the developer.
looks great overall, thanks for putting this together! :smiley:
From my understanding, Richard deserves credit as the main designer in the infobox.
just looking at other languages' wikipedia pages, it does appear that what consistently goes that box is whoever originally created the language - so I think they're using "designer" to mean "original creator"
it uses a multiple return type (containing either an
Okvalue or anErrvalue)
I would refer to this as an "algebraic data type" (and link to the article on it) rather than a "multiple return type" - just because "multiple return types" usually refers to a different language feature :smile:
also for "implementation language" I'd just put Rust and Zig rather than "Rust --> Zig" - because even the Rust version used Zig for the stdlib, so using both seems appropriate
Richard Feldman said:
just looking at other languages' wikipedia pages, it does appear that what consistently goes that box is whoever originally created the language - so I think they're using "designer" to mean "original creator"
Yes I agree
I'll make all of those changes
Richard deserves credit as the main designer in the infobox.
There is no doubt that Richard is the main designer. We have had extensive discussions about the design of Roc here on zulip and I wanted to make sure to acknowledge everyone's efforts here. I first thought about making it "Richard Feldman & Roc team" but Richard is part of the Roc team so that's kind of weird. Anyway, if the convention is that it means original creator, I am fine with it just being Richard.
Feel free to submit the article for review.
Submitted. We'll see how picky the reviewer is about third party sources. If they reject it it'll have to stay as a draft until more third party sources have been written or provided about Roc.
Any articles from reliable sources including academic journals, magazines etc would help.
I first thought about making it "Richard Feldman & Roc team" but Richard is part of the Roc team so that's kind of weird.
Not at all weird, IMHO. Totally normal turn of phrase.
Rejected! Presumably not enough of the third party sources were considered "independent" enough due to being mostly interviews with Richard. We'll just have to wait for more reliable sources to write about Roc. In the meantime, the draft is a great place to collect third-party sources about Roc, and touching it at least once every 6 months should prevent it being deleted.
thanks for putting it together!
No worries. Thanks for inventing the language.
I've reworked the definition for a Platform and would love suggestions for further improvements if it's not accurate:
The Platform is a domain-specific compilation framework. It acts as as interface between the application and the operating system and allows code compilation to be optimised for the given domain.
Additionally (my take), the boundary for impure functions. Roc itself is pure. Any impure functions in Roc must be calling hosted (platform) functions. The platform is the only possible source of impurity, by design. Platforms necessarily provide I/O and memory management functionality required by a "pure" application.
There is a conceptual distinction beyond a compilation framework. The hosted portion of a platform cannot be implemented in Roc, by definition, and is typically in a systems language, and such build environments can provide access to systems libraries that would not otherwise be available to Roc.
Thanks. I don't know how to word that yet but I'll have a think about it.
I recommend get some else's more authoritative take, and consider mine food for thought. Make sure to review https://www.roc-lang.org/platforms (updated: @Alec Gargett ) I notice this doc is much improved, recently.
Last updated: Feb 20 2026 at 12:27 UTC