<p><pre><code> Move is a subset of JavaScript [...] The following three examples are all valid Move code while the last one is also valid JavaScript code
</code></pre>
You keep using that word. I do not think it means what you think it means.
<p><pre><code> Variables need not be explicitly declared. Move will
declare a newfound variable in the scope which it first
was used.
</code></pre>
How does this interact with lexical scope? For example, how would the go-to counter example (in JavaScript below) be expressed in Move?<p><pre><code> function makeCounter() {
var x = 0;
return function() {
return x++;
};
}
</code></pre>
Does Move not require declarations because it has implicit declarations whenever there's a usage of any variable? (In which case the above example couldn't be expressed without some kind of circumlocution—again, like in Python.) Or are variables always looked up in the outermost scope, so you can't have a variable whose name is shared by another variable in an enclosing scope?<p><pre><code> No commas required to terminate expressions. Move will
determine when a comma is needed so you don't have to
(and the code gets more readable).
</code></pre>
Given that all the code has commas in the same places as in JavaScript, I'm going to assume s/comma/semicolon, and s/expression/statement, to be pedantic.
> In JavaScript, there are two different ways to define a function: using the function expression and the function declaration statement, the latter having subtle restrictions. Move only has function expressions.<p>Except using named functions will also make your stack traces useful. Because function names tell you more than line numbers.