Skip to content

Commit

Permalink
doc: clarify let x without an assignment (#48122)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengj authored Jan 6, 2023
1 parent 46365ea commit 0eafda8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion base/docs/basedocs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,8 @@ sense to write something like `let x = x`, since the two `x` variables are disti
the left-hand side locally shadowing the `x` from the outer scope. This can even
be a useful idiom as new local variables are freshly created each time local scopes
are entered, but this is only observable in the case of variables that outlive their
scope via closures.
scope via closures. A `let` variable without an assignment, such as `var2` in the
example above, declares a new local variable that is not yet bound to a value.
By contrast, [`begin`](@ref) blocks also group multiple expressions together but do
not introduce scope or have the special assignment syntax.
Expand Down

2 comments on commit 0eafda8

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

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

Executing the daily package evaluation, I will reply here when finished:

@nanosoldier runtests(isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

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

Your package evaluation job has completed - possible new issues were detected. A full report can be found here.

Please sign in to comment.