Skip to content

Represented textual expression using CustomDebugStringConvertible.#193

Merged
ikesyo merged 1 commit intoikesyo:masterfrom
es-kumagai:TextualRepresentationByDebugStringConvertible
May 11, 2018
Merged

Represented textual expression using CustomDebugStringConvertible.#193
ikesyo merged 1 commit intoikesyo:masterfrom
es-kumagai:TextualRepresentationByDebugStringConvertible

Conversation

@es-kumagai
Copy link
Copy Markdown
Contributor

@es-kumagai es-kumagai commented Dec 12, 2017

Represented textual expression using CustomDebugStringConvertible protocol instead of CustomStringConvertible protocol.

Motivation

This motivation is that I'd like to customize a text representation of DecodeError instance to displaying error message in my application. I tried to make DecodeError conform to CustomStringConvertible protocol, but it was already conformed to it, so I couldn't do that.

Express as a debug information

In addition, I think the textual expression of DecodeError that are provided by CustomStringConvertible seems to be debug information.

In this reason, I'd like to propose to express the information using CustomDebugStringConvertible protocol instead of CustomStringConvertible protocol.

For the same reason, I'd like to propose that to Extractor and KeyPath too.

…rotocol instead of `CustomStringConvertible` protocol.
@ikesyo
Copy link
Copy Markdown
Owner

ikesyo commented May 11, 2018

Sorry for the really late response 🙇

But this makes sense! Thanks for the pull request 👍

@ikesyo ikesyo merged commit 5f9a372 into ikesyo:master May 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants