Skip to content

Tracking issue for experiments around coercions, generics, and Copy type ergonomics #44619

Closed
@aturon

Description

@aturon

This issue tracks experimental work, overseen by the lang team, on several interrelated topics:

  • Improving the ergonomics around Copy types and references (i.e. "imagine never having to write &0 or let z = &u * &(&(&u.square() + &(&A * &u)) + &one); again)
  • Improving the consistency of method dispatch for operators with standard dispatch.
  • Improving the ergonomics around using owned values where references are expected.
  • Improving the interaction between generics and coercions.
  • Improving the interaction between function-passing code and coercions.
  • Helping to avoid accidental copies of large Copy types.
  • Potentially a very limited form of auto-Clone.

None of these bullet items should be taken as signifying a decision, but rather a desire to experiment in a particularly tricky design space.

Ongoing experiments

Relevant previous discussions

This tracking issue is a good place to continue discussion, at least initially; we may ultimately want to break out threads on internals to help hash out preliminary design thoughts.

After an experimental period, the expectation is that whatever designs are deemed sufficiently plausible are turned into fresh RFCs, and then go through the standard process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-type-systemArea: Type systemC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-langRelevant to the language teamWG-traits[RETIRED] Working group: Traitsdisposition-postponeThis issue / PR is in PFCP or FCP with a disposition to postpone it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions