I’ve started implementation of the LocaleInfo class in Chrome and I would
like to clarify what the actual parameters are and how do we construct the
object given those parameters.
Differences to the current proposal are (for sake of simplification, but
without any loss in clarity or functionality)
Sorry, scratch the idea of passing __ThisBinding__ as
__arguments__[0]. The "improved" desugaring should have been...
let __parameterList__ = "a, , c = \"c\", ...d";
var f = new Function(
__parameterList__,
"!__ThisBindingIsExplicit__ && __ThisBinding__ ??= defaultThis; var
[" + __parameter
Also, as destructuring / rest parameters / "this = defaultThis|"
already allows things like...
function (this = defaultThis| [a, {b}], ...c ){}
... it would probably be useful to allow equivalent functions to be
declared dynamically with "new Function", something like ...
let f = new Functio
On Wed, Apr 6, 2011 at 8:25 AM, David Herman wrote:
> Sure. Surface syntax isn't set in stone, but we aren't likely to go back to
> just the string literal, since it looks too much like the module is being
> assigned a string value.
I know you do not want to get into bikeshedding at this point,
Yes, |this| is shadowed as it is in functions. You could always do |var self =
this| if you want:
module M {
var self = M;
module N {
... self ...
}
}
but modules are already named, so you can just use the name instead:
module M {
module N
Maybe I was over-thinking this problem: I was wondering how to access
module-global data if "this" is shaded. It seemed similar to the "var self =
this" work-around when using non-methods inside methods (forEach() etc.).
module Foo {
var bar = "abc"; // like a global inside this module, righ
> Why I was asking -- because I saw it in your talk on ES.next, where you used
> exactly this approach, i.e. module Foo = "http://modules.com/foo.js"; --
> without any `require`. That's it.
No problem, I didn't mean to chastise. Just trying to keep focussed.
> (should I fix my following present
> - Does it ever make sense to access globals via "this"? If so, I assume there
> will be a use case in the upcoming modules rationale document.
Reflecting the globals via |this| preserves some web compatibility with
programs that dynamically test the global object. It allows you some
lightweig
Right. In this case, pattern matching object literals is a good metaphor,
assignment (lhs is "new", rhs is "old") isn't.
On Apr 6, 2011, at 17:12 , David Herman wrote:
> The way I think about it is, whenever you have X: Y where X and Y are
> identifiers, the one on the left is fixed and the one
The way I think about it is, whenever you have X: Y where X and Y are
identifiers, the one on the left is fixed and the one on the right is variable.
- In an object literal, the one on the left is a symbolic property name and the
one on the right is a variable.
- In destructuring, the one on th
Le 06/04/2011 08:14, Allen Wirfs-Brock a écrit :
> I''ve been a bit pinch for time the last couple days, but here are
> some preliminary responses to a few points below.
>
> On Apr 5, 2011, at 1:38 PM, David Bruant wrote:
>
>>> On Apr 2, 2011, at 5:11 PM, Brendan Eich wrote (except the this is
>>>
I''ve been a bit pinch for time the last couple days, but here are some
preliminary responses to a few points below.
On Apr 5, 2011, at 1:38 PM, David Bruant wrote:
>> On Apr 2, 2011, at 5:11 PM, Brendan Eich wrote (except the this is really
>> quoting Allen Wirfs-Brock):
>>>
>> Inheritance-b
12 matches
Mail list logo