(forked from https://roc.zulipchat.com/#narrow/stream/231634-beginners/topic/Task.2Ferror.20handling.20.26.20platform.20use/near/314385634)
In cases where we just don't care to handle errors explicitly (such as in a time-sensitive Advent of Code competition), but also In the interest of being able to report errors cheaply, is there, or could there be some way for the language to intern the primary/top-level tag name in the binary, and then provide a function which can convert any tag to its name? There could be a lot of utility in being able to print out the difference between a FileNotFound style error vs an Encoding error, even if we can't see the tag argument information.
Alternatively, could there be an ability that tags implicitly implement which allow them to render themselves as a Str? (I believe this might be the display ability?)
Handling errors explicitly is fine and to be encouraged for productionized systems, but the error handling trade-offs I was able to infer at least in Roc, as it is today, presently limit its utility for developing throwaway scripts that happen to need to do I/O.
yeah we've talked about an Inspect ability that could do this! (It would work similarly to Rust's Debug trait, and would enable a function Str.inspect : * -> Str)
Last updated: Jun 16 2026 at 16:19 UTC