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

Explore mechanisms for defining external binary representations #4

Open
3 tasks
jverkoey opened this issue Feb 19, 2019 · 0 comments
Open
3 tasks

Explore mechanisms for defining external binary representations #4

jverkoey opened this issue Feb 19, 2019 · 0 comments
Labels
feature request New feature or request

Comments

@jverkoey
Copy link
Owner

jverkoey commented Feb 19, 2019

Swift Codable is able to generate encoding and decoding implementations for free because of the availability of key/value containers. Binary Codable does not support key/value containers, so it is not presently possible to map properties to external representations without making some potentially scary assumptions about order.

A completely generalized solution to this problem is not desired due to the need for conditional encoding/decoding paths in complex cases. Solving conditional coding is considered a non-goal for this task; in such cases custom implementations of encoding/decoding are encouraged instead.

A successful solution to this task will meet the following requirements:

  • It is possible to map properties to regions of memory bi-directionally (encoding + decoding).
  • It is possible to map BinaryCodable entities to regions of memory bi-directionally (encoding + decoding).
  • Such a definition only needs to be made once for a given object, similar to the CodingKeys pattern in Swift Codable.
@jverkoey jverkoey mentioned this issue Feb 23, 2019
@jverkoey jverkoey added help wanted Extra attention is needed feature request New feature or request and removed help wanted Extra attention is needed labels Feb 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant