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

Nominal classes and methods #701

Closed
wants to merge 47 commits into from
Closed

Nominal classes and methods #701

wants to merge 47 commits into from

Conversation

josh11b
Copy link
Contributor

@josh11b josh11b commented Aug 3, 2021

TODO: add summary and links here

@josh11b josh11b added the proposal A proposal label Aug 3, 2021
@josh11b josh11b requested a review from a team August 3, 2021 22:10
@google-cla google-cla bot added the cla: yes PR meets CLA requirements according to bot. label Aug 3, 2021
josh11b and others added 26 commits August 3, 2021 15:10
Proposal: use `and`, `or`, and `not` keywords in place of `&&`, `||`, `!`.

Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
This implements decision #565 to use `T:! Type` to declare generic parameters, and `template T:! Type` for template parameters.

Co-authored-by: Richard Smith <richard@metafoo.co.uk>
bazelbuild/bazel#11628 is in Release 4.1 - May 2021 #13099

Pin vs rm for build repeatability.
I think the MS C++ extension is what was causing vscode to hang for me. I've been trying clangd and it seems to work better.

yash is syntax highlighting for ypp/lpp. The builtin markdown support's gotten better, so I'm removing the non-standard recommendation.
Note this doesn't support other sizes or types, it just errors on them.

Co-authored-by: Geoff Romer <gromer@google.com>
Adds FATAL for things that are most likely programming errors in executable_semantics.
- `PATH` is a caching issue, as commented.
- `exec.map` is a correctness issue, the reference to `test` was incorrect on threading so it wasn't updating all tests.

Co-authored-by: Geoff Romer <gromer@google.com>
Oversight from #704, I'd had this change in the client but missed it because I ran git add in the wrong spot.
Co-authored-by: Geoff Romer <gromer@google.com>
jonmeow and others added 21 commits August 9, 2021 08:19
…ork (#561)

This proposal defines the very basics of `class` types, primarily focused on:

-   use cases including: data classes, encapsulated types, inheritance with and without `virtual`, interfaces as base classes, and mixins for code reuse;
-   anonymous data types for called _structural data classes_ or _struct types_. Struct literals are used to initialize class values and ad-hoc parameter and return types with named components; and
-   future work, including the provisional syntax already in use for features that have not been decided.

The intent is to both make some small incremental progress and get agreement on direction. As such it doesn't include things like nominal types, methods, access control, inheritance, etc.

It proposes this struct type and literal syntax:
```
var p: {.x: Int, .y: Int} = {.x = 0, .y = 1};
```
Note that it uses commas (`,`) between fields instead of semicolons (`;`), and no introducer for types or literal values.

Incorporates decisions from #665 , #653 , #651


Co-authored-by: Geoff Romer <gromer@google.com>
Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
@josh11b josh11b closed this Aug 10, 2021
@josh11b josh11b deleted the classes branch August 10, 2021 17:38
@github-actions github-actions bot added the proposal deferred Decision made, proposal deferred label Jul 25, 2022
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 deferred Decision made, proposal deferred proposal A proposal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants