carbon-lang icon indicating copy to clipboard operation
carbon-lang copied to clipboard

Matching forward declaration of functions and classes

Open josh11b opened this issue 2 years ago • 1 comments

Description of the bug:

  • Question-for-leads issue #472 and proposal #875 established that Carbon will use forward declarations.
  • Question-for-leads issue #1132 described the general rules for how to match forward declarations with their definitions.
  • Proposal #1084 implemented the decision in #1132 to allow forward declaration of interfaces and implementations.
  • Proposal #722 and PR #1026 added support for forward declaring classes
  • PR #1017 explained how to forward declare functions

What is missing is an update to the description of function and class declarations to include the matching rules from #1132. In particular, that they are matched by name and if a declaration and definition have matching names but are different in other details, then an error should be reported at compile time.

It isn't super clear to me if making these changes should be a proposal or just a PR.

Link to documentation:

josh11b avatar Dec 17 '22 01:12 josh11b