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

Add statement syntax for function declarations #438

Merged
merged 28 commits into from
May 19, 2021
Merged

Add statement syntax for function declarations #438

merged 28 commits into from
May 19, 2021

Conversation

jonmeow
Copy link
Contributor

@jonmeow jonmeow commented Apr 7, 2021

Add statement syntax (either fn or func, see proposal) for function declarations.

  • Follows C++-style trailing return syntax.

@jonmeow jonmeow requested a review from a team April 7, 2021 21:03
@jonmeow jonmeow added WIP proposal A proposal labels Apr 7, 2021
@google-cla google-cla bot added the cla: yes PR meets CLA requirements according to bot. label Apr 7, 2021
@jonmeow jonmeow changed the title functions Functions Apr 7, 2021
proposals/p0438.md Outdated Show resolved Hide resolved
proposals/p0438.md Outdated Show resolved Hide resolved
proposals/p0438.md Outdated Show resolved Hide resolved
Copy link
Contributor Author

@jonmeow jonmeow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the comments. Just to be sure, if you think I'm pushing too far on forward declarations, please let me know -- it'd just come into my mind as I figured it was something I should cover, particularly as I was gathering examples and Carbon will be a bit of an exception for still having forward declarations.

proposals/p0438.md Outdated Show resolved Hide resolved
proposals/p0438.md Outdated Show resolved Hide resolved
@jonmeow jonmeow added proposal rfc Proposal with request-for-comment sent out and removed WIP labels Apr 8, 2021
@jonmeow jonmeow changed the title Functions Add statement syntax for function declarations Apr 13, 2021
@jonmeow jonmeow linked an issue Apr 14, 2021 that may be closed by this pull request
@jonmeow jonmeow requested a review from a team as a code owner April 14, 2021 23:51
proposals/p0438.md Outdated Show resolved Hide resolved
proposals/p0438.md Outdated Show resolved Hide resolved
proposals/p0438.md Show resolved Hide resolved
proposals/p0438.md Show resolved Hide resolved
proposals/p0438.md Show resolved Hide resolved
proposals/p0438.md Outdated Show resolved Hide resolved
proposals/p0438.md Outdated Show resolved Hide resolved
proposals/p0438.md Outdated Show resolved Hide resolved
proposals/p0438.md Outdated Show resolved Hide resolved
proposals/p0438.md Outdated Show resolved Hide resolved
Copy link
Contributor Author

@jonmeow jonmeow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing a round of comment-based updates.

proposals/p0438.md Outdated Show resolved Hide resolved
proposals/p0438.md Outdated Show resolved Hide resolved
proposals/p0438.md Show resolved Hide resolved
proposals/p0438.md Show resolved Hide resolved
proposals/p0438.md Outdated Show resolved Hide resolved
proposals/p0438.md Outdated Show resolved Hide resolved
proposals/p0438.md Outdated Show resolved Hide resolved
proposals/p0438.md Outdated Show resolved Hide resolved
proposals/p0438.md Outdated Show resolved Hide resolved
proposals/p0438.md Show resolved Hide resolved
@jonmeow
Copy link
Contributor Author

jonmeow commented Apr 23, 2021

Updated to reflect the conclusion of #463

@chandlerc chandlerc assigned chandlerc and unassigned chandlerc Apr 23, 2021
proposals/p0438.md Outdated Show resolved Hide resolved
Copy link
Contributor

@zygoloid zygoloid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks great. Please proceed.

@jonmeow jonmeow merged commit aeb4a15 into carbon-language:trunk May 19, 2021
@jonmeow jonmeow deleted the proposal-functions branch May 19, 2021 21:43
@github-actions github-actions bot added proposal accepted Decision made, proposal accepted and removed proposal rfc Proposal with request-for-comment sent out labels May 19, 2021
jonmeow added a commit that referenced this pull request Jan 28, 2022
I was doing this for #851 initially, but I think #438 and #826 hadn't made it in (possibly intentionally due to #851? I don't recall). 

Co-authored-by: Chandler Carruth <[email protected]>
Co-authored-by: Richard Smith <[email protected]>
chandlerc pushed a commit that referenced this pull request Jun 28, 2022
Add statement syntax (either `fn` or `func`, see proposal) for function declarations.

- Follows C++-style trailing return syntax.

Co-authored-by: Geoff Romer <[email protected]>
Co-authored-by: josh11b <[email protected]>
chandlerc added a commit that referenced this pull request Jun 28, 2022
I was doing this for #851 initially, but I think #438 and #826 hadn't made it in (possibly intentionally due to #851? I don't recall). 

Co-authored-by: Chandler Carruth <[email protected]>
Co-authored-by: Richard Smith <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes PR meets CLA requirements according to bot. proposal accepted Decision made, proposal accepted proposal A proposal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Blocking] Function keyword: fn or func?
5 participants