Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conform to CustomReflectable #21

Open
DandyLyons opened this issue Sep 12, 2024 · 1 comment
Open

Conform to CustomReflectable #21

DandyLyons opened this issue Sep 12, 2024 · 1 comment
Assignees

Comments

@DandyLyons
Copy link
Collaborator

Add conformance to CustomReflectable

Helpful Resources

https://nshipster.com/mirror/

@DandyLyons DandyLyons self-assigned this Sep 12, 2024
@DandyLyons
Copy link
Collaborator Author

DandyLyons commented Sep 12, 2024

@ladvoc What capability is currently missing from the Mirror that you are looking for?

I was surprised to discover that currently the mirror already behaves like a Dictionary in every way that I tested so far. My guess is that we got a lot for this for free from a conformance to ExpressibleByDictionaryLiteral and/or Collection.

var bDict: BijectiveDictionary<String, Int> = ["A": 1, "B": 2]
let mirrorString = String(reflecting: bDict) // ["A": 1, "B": 2]

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

When branches are created from issues, their pull requests are automatically linked.

1 participant