Skip to content

Commit

Permalink
Add "let" and "set for variables
Browse files Browse the repository at this point in the history
Also add a note on performance for #82.

Fixes #88.
  • Loading branch information
annevk committed Mar 23, 2017
1 parent 139484a commit 4a085e3
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions infra.bs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,24 @@ leading spaces" or "return false") are to be interpreted with the meaning of the
manner, so long as the end result is equivalent. (In particular, the algorithms are intended to be
easy to follow, and not intended to be performant.)

<p class=note>Performance is tricky to get correct as it is influenced by user perception, computer
architectures, and different types of input that can change over time in how common they are. For
instance, a JavaScript engine likely has many different code paths for what is standardized as a
single algorithm to optimize for speed on memory consumption. Standardizing all those code paths
would likely be an insurmountable task and not productive as they would not stand the test of time
as well as the single algorithm would. Therefore performance is best left as a field to compete
over.


<h3 id=variables>Variables</h3>

<p>A variable is declared with "let" and changed with "set".

<p class=example id=example-variable>Let |list| be a new <a>list</a>.</p>

<p>The scope of a variable is the step |s| it's declared in and any further and nested steps of the
iteration |s| is in.


<h3 id=algorithm-control-flow>Control flow</h3>

Expand Down Expand Up @@ -732,6 +750,7 @@ as 200/`<code>OK</code>`.
Dominic Farolino,
Jake Archibald,
Jungkee Song,
Leonid Vasilyev,
Malika Aubakirova,
Michael™ Smith,
Mike West,
Expand Down

0 comments on commit 4a085e3

Please sign in to comment.