At some point in the past, I proposed that we introduce syntax for that. In my
proposal, prefixing an identifier with a . would create an unambiguous
reference to the global version of that variable.
For example:
```js
var x;
function f(x) {
x; // local
.x; // global
}
```
This is an
According to the spec, the toISOString is currently defined to return a string
in the format -MM-DDTHH:mm:ss.sssZ.
Specifically, there's a 3-digit fractional part introduced by a . (that's the
.sss above) appended to the seconds.
It is my understanding of the ISO8601 spec that fractional
And maybe there should be a Object.move for value types...
From: Frankie Bagnardi f.bagna...@gmail.commailto:f.bagna...@gmail.com
Date: Tuesday, June 10, 2014 at 2:47 PM
To: Alex Kocharin a...@kocharin.rumailto:a...@kocharin.ru
Cc: es-discuss@mozilla.orgmailto:es-discuss@mozilla.org
We don't need an identifier for global. Much like with the :: operator in C++,
a member expression starting with a . would always refer to the global object.
So if you want to refer to member foo in the global object, .foo would be
unambiguous.
I feel like it's a simple, yet elegant solution.
I kind of feel that even if such a bytecode existed, it should be immaterial to
the design of ES. What I'm trying to say is that probably a better place for
this discussion is at the web standards level. This decision can be completely
outside of the design of any individual language, provided
I agree with you that this would be a much better design, but it would break
backwards compatibility with ES5, no?
Minor nitpick: I guess you mean to say that ToPropertyDescriptor should use the
abstract operation HasOwnProperty, not [[HasOwnProperty]]...
Fred
From: John-David Dalton
6 matches
Mail list logo