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

Synonyms #165

Open
issa-tseng opened this issue Oct 19, 2019 · 1 comment
Open

Synonyms #165

issa-tseng opened this issue Oct 19, 2019 · 1 comment

Comments

@issa-tseng
Copy link
Owner

sometimes, two values are interrelated in a bidirectional fashion: some reversible function exists to transform each to the other. well—often, actually, but we tend not to bother with the synonyms much when we have to code each one up.

practical examples:

  • two representations of time: framecount vs seconds
  • index <-> single element of a discrete space

in many of these cases, it would be nice if rather than being forced to choose a primary and a bound derivative, the bidirectional relationship could be expressed, and the singular nature of the underlying value can be reasoned about directly. then, questions around reading or writing to the value as seen by the representations shed all these artificial translations and limitations.

@issa-tseng
Copy link
Owner Author

almost forgot: smart people call these bijections.

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

No branches or pull requests

1 participant