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

Traits #3451

Closed
Tracked by #3293
pbiggar opened this issue Feb 6, 2022 · 1 comment
Closed
Tracked by #3293

Traits #3451

pbiggar opened this issue Feb 6, 2022 · 1 comment

Comments

@pbiggar
Copy link
Member

pbiggar commented Feb 6, 2022

Many of the things that relied on "magic" in v1 could be solved with Traits. Thoughts:

  • Trait for how to pretty-print for users
  • Trait for hooking a value into a visualization system in the editor
  • Trait for the SQL query compiler?
  • Trait for addition, subtraction, etc
  • maybe there's a set of known binops and they have traits defined for each of them
  • fromJSON, toJSON
  • Should implementations be implicitly derived, or explicitly derived and editable?

Open questions:

support we have a type A, and users are using type A. Can we add trait B to type A? Probably not, that would change its behaviour.

So we'd have to make type A1, with that trait.

This could cause type explosion, so we'll need to automatically generate ways to convert types to/from different versions that are structurally the same

@StachuDotNet
Copy link
Member

folded into a larger issue for now

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

2 participants