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

Update spec from google/starlark-go #107

Merged
merged 6 commits into from
Sep 24, 2020
Merged

Conversation

laurentlb
Copy link
Contributor

@laurentlb laurentlb commented Sep 24, 2020

  • document call argument evaluation order
  • load statements create local bindings
  • Rename "universe" to "predeclared"
  • hash: allow only strings
  • Add TOC

@@ -463,8 +463,7 @@ values include `None`, Booleans, numbers, and strings, and tuples
composed from hashable values. Most mutable values, such as lists,
and dictionaries, are not hashable, unless they are frozen.
Attempting to use a non-hashable value as a key in a dictionary
results in a dynamic error, as does passing one to the built-in
`hash` function.
results in a dynamic error.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the old text was correct (does that mean this change needs to flow in the other direction?).

Both hash implementations accept only string, not list, say.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that's correct.

The old text said it's an error to pass a non-hashable value to hash. This might be technically true, but that's irrelevant since hash accepts only strings. No need to mention hash here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, of course.

@@ -463,8 +463,7 @@ values include `None`, Booleans, numbers, and strings, and tuples
composed from hashable values. Most mutable values, such as lists,
Copy link
Contributor

Choose a reason for hiding this comment

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

I noticed that the TOC that exists in Go spec has vanished from bazelbuild. Could you restore it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

(this aligns with the doc in google/starlark-go)
Copied from google/starlark-go
@laurentlb laurentlb merged commit 4b7dd59 into bazelbuild:master Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants