Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Struct syntax proposal #511
Struct syntax proposal #511
Changes from 2 commits
0b6c83f
d041c01
f2a1e06
87fcc3a
2c7272c
a5d859a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Reference by absolute path" more explicitly conveys a user's intent than a graph search for the type name. Looking at the vspec, the reader wouldn't know where exactly the type is picked up from.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no problem limiting ourselves (for now) to either referring to a name in the same branch or using absolute path. We can always add graph search later if there would come up a reasonable use-case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to this.
Referencing by qualified name/path is useful.
It allows for namespacing type names with the same identifier (like C++ namespaces).
We could think of the node path of the struct node as the enclosing namespace for the type name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a much more advanced modeling use case (like inner classes in programming languages which is not that often used). We could extend the specification once the basic modeling of structs is launched and we have feedback on gaps/use cases that need to be covered by future extensions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no problem with that limitation. Better to start small and extend as needed. If no-one has any other objection I will remove the "inner struct" example and replace it with a statement similar to:
"It shall not be allowed to define a struct within a struct"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a proposal for default values