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

doc/go_mem: define "control flow constructs" #54383

Open
shichuzhu opened this issue Aug 10, 2022 · 1 comment
Open

doc/go_mem: define "control flow constructs" #54383

shichuzhu opened this issue Aug 10, 2022 · 1 comment
Labels
Documentation NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@shichuzhu
Copy link

for Go's control flow constructs as well as the <a href="/ref/spec#Order_of_evaluation">order of evaluation for expressions</a>.

I'm reading the Go memory model doc, and this part is not clear to me,
'''
the sequenced before relation, defined as the partial order requirements set out by the
Go language specification for Go's control flow constructs
as well as the order of evaluation for expressions
'''

It's not clear what exactly consist Go's control flow constructs.
The link is a general link to the full language spec, but searching for "control flow constructs" in the language spec doesn't match anything.

  1. It'll be great if there can be an explicit definition for "Go's control flow constructs", either in the language spec, or in the memory model doc.
  2. The language spec does not have clear indication of the concept of 'partial order'. For example, in https://go.dev/ref/spec#If_statements, “If the expression evaluates to true, the "if" branch is executed, otherwise, if present, the "else" branch is executed.”
    It seems to indicate the expression and the "if/else" branch has some partial order, but this isn't obvious enough to be reflected when reading the memory model doc.
@seankhliao seankhliao changed the title What is "Go's control flow constructs"? doc/go_mem: define "control flow constructs" Aug 10, 2022
@seankhliao seankhliao added Documentation NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Aug 10, 2022
@seankhliao
Copy link
Member

cc @rsc

@seankhliao seankhliao added this to the Unreleased milestone Aug 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

2 participants