HE Shi-Jun
HE Shi-Jun
I think what @ghost want could be something like ```js let accessor = ref typecounters[0] let index = Atomics.add(...accessor, 1) ``` Aka, make ref expression create a Reference object with...
@ljharb Template tag is an interesting idea, though it's even much verbose ... 😅 But u inspired me, it could also be `function.plus` or `do.plus` (meta method :-)
@tabatkins I understand your concern, but there will be more weirdness if we support explicit this in class constructor, for example, if we support `constructor(this x) {}`, it seems we...
@tabatkins Could you make clear about that ? Do you mean you prefer allowing rename of `this` argument of class constructor but disallowing destructure of `this` argument? Doesn't that also...
It seems we have different understanding of what "this argument/parameter" mean. My understanding is based on the current syntax and APIs of JS: - `foo.bar()` - `foo.bar.apply(foo)` - `foo.bar.call(foo)` -...
> the `new` passes a new one, and if you invoke a non-class constructor as a function with .call or similar, it gets a different one. @ljharb I don't understand...
@ljharb You are describing the mechanism, technically we can still name such `this` in `new` as "this argument" in spec, but I feel it's really confusing to name something not...
So it's more like a naming issue. Maybe we could make it clearer by renaming this proposal from "explicit this" to "explicit this argument" if it could help to solve...
> I do not think people will be confused by destructuring this not working in this case. @tabatkins As my experiences, it's dangerous to affirm people will **not** be confused...
@tabatkins None of my comments say people shouldn't rename the `this` value in constructor. I'm sorry if I don't make it clear. What I need to clarify is renaming `this`...