For context, see #5325, which built off of #4968.
I made a PR for adding colours to Crystal runtime errors, similar to what we already did for compile-time errors (yellow and bold text for suggestions, IIRC), a long time ago (which I just found out about again recently). Everyone was pretty split on the issue, so I was wondering what the current general opinion is on colourising runtime errors with basic ANSI formatting, examples of which can be seen in #5325.
Personally, I think it's a good idea - colour can be used to highlight functions and such, or the whole thing can be coloured red (like Java and Python already do in IDEs and such) in order to make the runtime error stand out from regular output.
I don't think being uneccessarily fancy at runtime is useful. The runtime errors should stay simple IMO. Adding color to every error (i.e. adding ANSI escape sequences) will only make the binary size even bigger than it already is since all the error messages are included in your binary.
I think stuff like that should be rather done in an IDE etc.
@r00ster91 Binary size is hardly a problem. We're talking about a few hundred bytes here. Max.
But regarding colourization I think I follow the arguments made by @asterite in https://github.com/crystal-lang/crystal/pull/5325#issuecomment-354688139
The error messages are already formatted in a standardized way that makes them easy to read for humans and machines. Colorizing adds little benefit but much complexity (when to apply). It can easily be customized if you wish for your application to behave differently. But I think the stdlib default behaviour is good.
Most helpful comment
@r00ster91 Binary size is hardly a problem. We're talking about a few hundred bytes here. Max.
But regarding colourization I think I follow the arguments made by @asterite in https://github.com/crystal-lang/crystal/pull/5325#issuecomment-354688139
The error messages are already formatted in a standardized way that makes them easy to read for humans and machines. Colorizing adds little benefit but much complexity (when to apply). It can easily be customized if you wish for your application to behave differently. But I think the stdlib default behaviour is good.