HE Shi-Jun
HE Shi-Jun
> In a real-life JavaScript application (even before es6), most invocations happen in callbacks, like event handlers, schedulers, etc. Ideally the main function should be called start from DOMContentLoaded, unfortunately...
Personally I don't think ASI is very important in this specific case, even we use `do`, the mainstream coding style will be always `do {`(no newline between `do` and `{`),...
Yeah I like the idea of `expr {...}`, and maybe we could just use `eval {...}`, so people could simply understand it as sugar for `eval("{ ... }")` (though we...
Whether it's a sugar or not, is depend on the final semantic we choose. If the semantic is closed enough,let's say, if almost all `do {CODE}` could be replaced by...
All names of `yield.xxx` suffer from the issues: 1. `yield.xxx` and `(yield).xxx` have different semantics in generators. 1. `yield.xxx` have different semantics in generators (meta property) and non-strict non-generator codes...
> Adding parens to things causes different semantics all over the place @ljharb Could you explain more about that? I don't know other case which have different semantics between `identifier.xxx`...
@ljharb What I mean is member access (or similar, like metaproperty) chaining 😅 > - `a, b.c` vs `(a, b).c` > - `a + b + c` vs `(a +...
I have some thought about the name. The real meaning of `function.sent` in a generator function is "the value **sent** by the last `next()` call to a generator object which...
@isiahmeadows Oh, I forgot to add it. Added now. Currently I slightly prefer `function.got` or `function.input` because they are shorter 😛. I also slightly worry about `function.received` could be considered...
Though `function*.sent` may work, it looks very unlike a "meta **property**", not sure how committee would accept it 😅 . And addition of `*` also make ergonomics a little bit...