[ES5] Strict Mode では引数とarguments値は動的にリンクされない

ES3 では仮引数の値を変更すると対応する arguments プロパティ値にも反映される。 ES5 では Strict Mode でなければ ES3 と同じ挙動。 Strict Mode では仮引数とarguments値は動的にリンクされない。
0
think49 @think49

JavaScript、仮引数で宣言した変数へ代入したあとの arguments の挙動 - 冬通りに消え行く制服ガールは、夢物語にリアルを求めない。 - subtech ( http://goo.gl/7ci9M ) /ES5 では挙動が変わったと聞いたような…。後で調べる。

2010-11-05 05:26:47
think49 @think49

@think49 10.6 Arguments Object ( http://sideshowbarker.github.com/es5-spec/#x10.6 ) /記述が長くなってる…。一息には読めそうにない。やはり、後に回そう。

2010-11-05 05:30:24
azu @azu_re

The Strict Mode of ECMAScript 「the local identifier arguments to the arguments object is immutable」 "Annotated ES5" http://is.gd/gITEl

2010-11-05 05:34:28
think49 @think49

@azu_re ES5 では Strict Mode 限定で arguments と仮引数の共有がされなくなるんですね。勉強になりました。(引用元は http://sideshowbarker.github.com/es5-spec/#C かな)

2010-11-05 05:48:35
think49 @think49

"NOTE1 ... For strict mode functions, the values of the arguments object‘s properties are simply a copy of the arguments passed to ..."

2010-11-05 05:53:15
think49 @think49

"the function and there is no dynamic linkage between the property values and the formal parameter values." ( http://goo.gl/cKQVD )

2010-11-05 05:53:26
think49 @think49

"strict mode ではargumentsオブジェクトのプロパティはfuctionの引数のコピーであり、引数とarguments値は動的にリンクされません。"

2010-11-05 05:56:36