Skip to content

Commit

Permalink
clarify discussion of nil (google#262)
Browse files Browse the repository at this point in the history
* clarify discussion of nil

* fix typo
  • Loading branch information
adonovan authored Feb 3, 2020
1 parent ad61ea4 commit 6677ee5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions starlark/value.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@
// implementation of the Go function may use UnpackArgs to make sense of
// the positional and keyword arguments provided by the caller.
//
// Starlark's None value is not equal to Go's nil, but nil may be
// assigned to a Starlark Value. Be careful to avoid allowing Go nil
// values to leak into Starlark data structures.
// Starlark's None value is not equal to Go's nil. Go's nil is not a legal
// Starlark value, but the compiler will not stop you from converting nil
// to Value. Be careful to avoid allowing Go nil values to leak into
// Starlark data structures.
//
// The Compare operation requires two arguments of the same
// type, but this constraint cannot be expressed in Go's type system.
Expand All @@ -58,7 +59,7 @@
// function evaluates a single expression. All evaluator functions
// require a Thread parameter which defines the "thread-local storage"
// of a Starlark thread and may be used to plumb application state
// through Sklyark code and into callbacks. When evaluation fails it
// through Starlark code and into callbacks. When evaluation fails it
// returns an EvalError from which the application may obtain a
// backtrace of active Starlark calls.
//
Expand Down

0 comments on commit 6677ee5

Please sign in to comment.