I'm typing from my mobile and it's not straightforward to find whether or not this has been brought up before.
I think many people really like Rust's --explain functionality and I was wondering if any similar Roc efforts have been discussed (for introduction not necessarily at the present stage). It could be a huge win, in terms of user experience.
personally I'm not a fan of compilers emitting error codes, but I do like having them link to URLs with helpful information related to the error
however, at the moment we don't have much in the way of actual articles to link to! :big_smile:
Obviously this example is way inferior of what Roc's "helpfulness" is aiming for -- but speaking of providing not error codes but URLs to related docs:
Yeah, I have to agree about user-facing error codes. They aren't user-friendly, not pretty. But the corresponding articles would have to be indexed by something.
@Richard Feldman, has my understanding been correct that you wouldn't be against this kind of a feature in the future?
I definitely like the idea of some error messages including URLs linking to helpful related articles!
I don't think they need identifiers beyond the URLs themselves
if we want to have a list of them somewhere, we can do that
Hristo said:
I'm typing from my mobile and it's not straightforward to find whether or not this has been brought up before.
I think many people really like Rust's
--explainfunctionality and I was wondering if any similar Roc efforts have been discussed (for introduction not necessarily at the present stage). It could be a huge win, in terms of user experience.
Not trying to bash your proposal, but another downside of --explain is that it integrates rather poorly with editor tooling (i.e. tends to require a deliberate, manual step).
Granted, it's nice to have the option to get further explanation / docs but in that case URLs seem to cause the least "friction".
@Miilyn, no worries - I do understand what you mean.
I have to clarify that the proposal is more in the direction of introducing a means for accessing more detailed content, which is associated with and expands upon the (what are usually) 2-3 sentences' worth of compiler explanation. How those are made available to the user doesn't have to be limited to --explain or any other mechanism per se.
One advantage of coded errors is that it’s easier to find some discussions (articles, stack overflow, github etc) related to this specific error
I set up an issue #3580 a while ago for something like this :)
Last updated: Jun 16 2026 at 16:19 UTC