Ye olde arguments argument (was: Topic list - pending changes and issues for the ES3.1 spec)

Mark S. Miller erights at google.com
Thu Sep 11 17:39:03 PDT 2008


On Thu, Sep 11, 2008 at 4:09 PM, Peter Michaux <petermichaux at gmail.com> wrote:
> Isn't Tennent Correspondence completely shot anyway in ECMAScript?

Since ES is not an expression language, we need to examine TC
separately for expressions and statements. Given that ES3.1-strict
does no implicit coercion of 'this', then the *only* remaining
violation of TC for expressions in ES3.1-strict is arguments, which
we'll be deprecating once we have spread.

In the argument-less subset of ES3.1-strict for any expression "X",
"X" is equivalent to "(function(){ return X; }).call(this)". Given the
compact function-expression syntax expected post ES3.1, this will be
equivalent to the prettier "(function()X).call(this)". Obviously, if X
does not itself mention "this" freely, it is also equivalent to
"(function()X)()".

As for statements, I plan to reread the thread with Lex Spoon. I'm
tentatively hopeful we can improve things.

-- 
    Cheers,
    --MarkM


More information about the Es-discuss mailing list