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

Design overview update part 3: Safety #1328

Merged
merged 9 commits into from
Jun 14, 2022
Merged

Design overview update part 3: Safety #1328

merged 9 commits into from
Jun 14, 2022

Conversation

josh11b
Copy link
Contributor

@josh11b josh11b commented Jun 13, 2022

This follows #1274 and #1325 and fills in the "safety" section. It only covers our approach in general terms.

@josh11b josh11b requested review from a team as code owners June 13, 2022 21:02
Copy link
Contributor

@chandlerc chandlerc left a comment

Choose a reason for hiding this comment

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

Initial pass over the text. Much of this is trying to just improve the flow / wording, not trying to change anything significant.

docs/design/README.md Outdated Show resolved Hide resolved
docs/design/README.md Outdated Show resolved Hide resolved
Comment on lines 2297 to 2303
Carbon's clean grammar provides a simple and effective platform for adding
necessary syntax to annotate more precise semantics. This requires a systematic
cleanup and simplification of C++'s syntax and grammar, which is inherently a
backwards incompatible change. Grammar changes are actually among the cheapest
migrations since they are perfect for tooling and automation. This opens up
opportunities to provide easy pattern recognition and familiar syntactic anchors
for humans. It also simplifies compilers, IDEs, and tooling.
Copy link
Contributor

Choose a reason for hiding this comment

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

More suggested cleanups:

Suggested change
Carbon's clean grammar provides a simple and effective platform for adding
necessary syntax to annotate more precise semantics. This requires a systematic
cleanup and simplification of C++'s syntax and grammar, which is inherently a
backwards incompatible change. Grammar changes are actually among the cheapest
migrations since they are perfect for tooling and automation. This opens up
opportunities to provide easy pattern recognition and familiar syntactic anchors
for humans. It also simplifies compilers, IDEs, and tooling.
Carbon's clean grammar provides a simple and effective platform for adding more precise semantic annotations to the syntax. However, we designed the synatx to retain as much pattern recognition and familiar syntactic anchors as possible for humans while making the improvements. Beyond allowing easy development of semantic annotations, the simplified synatx also simplifies compilers, IDEs, and tooling for the language.

Not sure this paragraph carries its weight though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Deleted the paragraph.

Comment on lines 2305 to 2309
Once we have the ability to migrate C++ code to Carbon's simplified grammar, the
next step is to introduce the building blocks for safety. These are things we
need to add (relative to C++) without breaking migration. Rust can illustrate
exactly why we need these specific features, but we need to also have a
migration story for them.
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like this isn't saying much beyond what was above and in the bullet points. WDYT?

I'd be fine maybe just removing this paragraph and the previous (even after my edit) if you don't think they're adding much. The more interesting part seems the next two paragraphs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Deleting.

docs/design/README.md Outdated Show resolved Hide resolved
docs/design/README.md Outdated Show resolved Hide resolved
docs/design/README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@chandlerc chandlerc left a comment

Choose a reason for hiding this comment

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

Generally LGTM, especially as a good starting point. As discussed when we were talking, good to make sure we're doing a good job of representing the state of interop in the Rust world and the on-going efforts there, but feel free to land and update that paragraph in follow-ups or land with any improvements you get for that paragraph.

@josh11b josh11b merged commit fa8996a into carbon-language:trunk Jun 14, 2022
@josh11b josh11b deleted the safety branch June 14, 2022 20:22
josh11b added a commit that referenced this pull request Jun 28, 2022
This follows #1274 , #1325 , and #1328 . It fills in the "Bidirectional interoperability with C and C++" section.

Co-authored-by: Chandler Carruth <[email protected]>
Co-authored-by: Geoff Romer <[email protected]>
chandlerc added a commit that referenced this pull request Jun 28, 2022
This follows #1274 and #1325 and fills in the "safety" section. It only covers our approach in general terms.

Co-authored-by: Chandler Carruth <[email protected]>
chandlerc added a commit that referenced this pull request Jun 28, 2022
This follows #1274 , #1325 , and #1328 . It fills in the "Bidirectional interoperability with C and C++" section.

Co-authored-by: Chandler Carruth <[email protected]>
Co-authored-by: Geoff Romer <[email protected]>
josh11b added a commit that referenced this pull request Jul 6, 2022
This follows #1274 , #1325 , #1328 , and #1336 . It fills in the "Names" section.

Co-authored-by: Richard Smith <[email protected]>
Co-authored-by: Chandler Carruth <[email protected]>
josh11b added a commit that referenced this pull request Jul 8, 2022
This follows #1274 , #1325 , #1328 , #1336 , and #1347 . This has miscellaneous changes to the design overview without a particular focus.

Also adds some missing keywords to our list of keywords.

Co-authored-by: Jon Ross-Perkins <[email protected]>
josh11b added a commit that referenced this pull request Jul 15, 2022
This follows #1274 , #1325 , #1328 , #1336 , #1347 , and #1368 . This fills in details about how values work, value categories, parameter passing, unformed state, and so on.

Co-authored-by: Geoff Romer <[email protected]>
Co-authored-by: Richard Smith <[email protected]>
Co-authored-by: Chandler Carruth <[email protected]>
@chandlerc chandlerc added the documentation An issue or proposed change to our documentation label Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation An issue or proposed change to our documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants