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

Copy constructors and destructors #172

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

evincarofautumn
Copy link
Owner

@evincarofautumn evincarofautumn commented Feb 25, 2017

For #156

  • Move the “linearize” pass immediately after “scope”, so it’s done purely syntactically

  • Add copy and destroy traits and provide default (no-op) instances for built-in types

TODO:

  • Add tests

  • Derive these traits implicitly or more concisely (CTE?), correctly calling them for fields of ADTs

  • Requires generic trait instances to work for generic types

  • Requires trait constraints

  • The destructor should be called on the scrutinee of a match expression, after the match is complete

  • Add warnings when the presence of a nontrivial destructor would inhibit TCO

 * Move the "linearize" pass immediately after "scope", so it's done
   purely syntactically.

 * Add "copy" and "destroy" traits and provide default (no-op) instances
   for built-in types.

TODO:

 * Add tests

 * Derive these traits implicitly or more concisely (CTE?), correctly
   calling them for fields of ADTs

 * Requires generic trait instances to work for generic types

 * Requires trait constraints
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant