Skip to content

subsection on let blocks #188

@StefanKarpinski

Description

@StefanKarpinski

We don't explain let blocks since they're not control structures, per se. However, they're mentioned as introducing new variable scope blocks in [[Variables and Scoping]]. We need to explain them somewhere. @JeffBezanson, can you explain this, optimally with a few example to distinguish from other variables binding constructs — such as plain old assignment? I.e. what's the difference between these three blocks:

let x = 1
  # do something
end

begin
  local x = 1
  # do something
end

for x = [1]
  # do something
end

Metadata

Metadata

Assignees

Labels

docsThis change adds or pertains to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions