Hi all,
The review of SE-0489: Improve EncodingError
and DecodingError
's printed descriptions concluded on July 22, 2025. The language steering group has decided to accept the proposal.
Feedback was positive on adding conformances to CustomDebugStringConvertible
—as before with similar proposals, there is an acknowledged concern for binary compatibility issues for those who have adopted retroactive conformances that is likely to be minimally problematic in practice.
A substantial portion of the feedback surrounded the format of the proposed debug description, including a thoughtful point that line breaks could negatively affect existing logging tools. While the exact format of the debugging output is subject to change without review, the language steering group agrees that it is best to omit line breaks in this case to avoid unnecessary breakage since it is not essential for these particular conformances. We encourage the proposal implementor to engage with interested community members in iterating on the output for a concise and readable single-line format.
However, it would not be feasible to add retroactive semantic requirements for CustomDebugStringConvertible
across the board banning certain characters, nor did we achieve consensus to adopt a policy for the standard library going forward. Indeed, while existing practice tends to escape line breaks in the debug description (e.g., for String
), this is not always the case (e.g., for C++ types). But all can agree that it would make sense not to create known problems for existing tools where just as easily avoided.
Thank you, as always, to all participants in this review process for helping to make Swift a better language.
Xiaodi Wu