14:42 | <ryzokuken> | 18 minutes to showtime! |
14:58 | <Rob Palmer> | Starting in 2 mins! |
15:07 | <Michael Ficarra> | we call these "line terminators" |
15:18 | <Robert Pamely> | Is the audio choppy for others or just me? |
15:19 | <Ashley Claymore> | +1 |
15:20 | <shu> | seems delayed |
15:23 | <snek> | big fan of json.parse with source text |
15:25 | <Ashley Claymore> | Jitsi does have a 'performance settings' panel. Can choose between 'best performance' and 'highest quality'. I'm trying 'best performance' to see if that helps |
15:25 | <sarahghp> | Justin Ridgewell: I am also happy to review ye olde dedente |
15:26 | <snek> | if only jitsi had ai background noise removal |
15:26 | <snek> | if anyone wants to run their mic through such a tool, check this out https://github.com/noisetorch/NoiseTorch |
15:28 | <Michael Ficarra> | also RTX Voice from nvidia: https://www.nvidia.com/en-us/geforce/guides/nvidia-rtx-voice-setup-guide/ |
15:28 | <Justin Ridgewell> | Justin Ridgewell: I am also happy to review ye olde dedente |
15:29 | <rbuckton> | also RTX Voice from nvidia: https://www.nvidia.com/en-us/geforce/guides/nvidia-rtx-voice-setup-guide/ |
15:33 | <ljharb> | is keith on matrix? |
15:34 | <bakkot> | there three substring functions, in fact |
15:34 | <bakkot> | three |
15:34 | <ljharb> | slice, and the two bad ones? |
15:34 | <snek> | one for each stage |
15:36 | <rbuckton> | JSON.parse(text, reviver, { context: true }) ? |
15:37 | <rbuckton> | Would such a change be acceptable in Stage 3 if engines are concerned about perf? This happened to RegExp match indices as well. |
15:37 | <snek> | time to go ask all seven people who use the reviver function if perf is a concern to them |
15:37 | <shu> | i don't think that helps unless reviver paths are fast paths already, which i doubt |
15:38 | <shu> | but hey if someone complains then yeah we'll need something like that probably |
15:38 | <shu> | keith is 100% right that we do crazy shit in JSON.parse tuning |
15:38 | <Michael Ficarra> | not sure if my audio was coming through: I have not been able to review due to parental leave, but will happily review soon |
15:39 | <Michael Ficarra> | do not oppose it conditionally advancing |
15:40 | <ljharb> | btw does waldemar's review mean that duplicate named capture groups's conditional stage 2 is now actual stage 2? |
15:46 | <bakkot> | ljharb: yes |
15:51 | <bakkot> | wait, this creates a visible private field whose name is derived from the name of the accessor? i thought decorator's auto-accessors created private fields which you couldn't actually refer to (even in the body of the class) |
15:54 | <Ashley Claymore> | I don't think so. At least that wasn't my reading |
15:54 | <Ashley Claymore> | the #set creates a private setter |
15:54 | <Jack Works> | wait, this creates a visible private field whose name is derived from the name of the accessor? i thought decorator's auto-accessors created private fields which you couldn't actually refer to (even in the body of the class) |
15:54 | <littledan> | I think it's like if you do accessor x { get; #set } then you have a paired getter this.x and setter this.#x |
15:55 | <littledan> | I think this is a little weird, so I filed https://github.com/tc39/proposal-grouped-and-auto-accessors/issues/10 for a discussion thread. (Sorry for not filing before the meeting!) |
15:55 | <snek> | i think i just agree with kevin for now "I'd like to wait for decorators to exist for a while before advancing this" |
15:56 | <littledan> | Do we have examples of cases in mind where you want to observe an accessor pair rather than observing an automatically stored value? |
16:00 | <mpcsh> | would people be opposed to moving to zoom? IME it's the highest A/V quality and most reliable among the video conference apps. would a member company be willing to always host zooms? |
16:00 | <snek> | i hate zoom |
16:00 | <ryzokuken> | I would not strongly oppose zoom but would be quite upset |
16:00 | <ryzokuken> | snek: as always expressing things more efficiently! |
16:01 | <shu> | i would be opposed to moving to zoom yes |
16:01 | <snek> | i think every platform is gonna have a bad day at some point |
16:01 | <ljharb> | zoom is the best one by a large margin, but the native app can't be used on many corporate laptops |
16:01 | <ryzokuken> | ljharb: that just depends on which rubrics you care about |
16:02 | <ljharb> | it's got the best UX and reliability, then :-p |
16:02 | <ljharb> | but sure |
16:02 | <bakkot> | I liked meet personally |
16:02 | <snek> | i mean by quality/reliability alone i think discord stage channels are probably the best |
16:02 | <yulia> | i am getting rather choppy audio so it wasn't 100% clear to me the question |
16:02 | <ljharb> | i consider meet to be the second best in my experience, but the room-level controls are severely lacking (both for attendees and admins) |
16:02 | <Jack Works> | would people be opposed to moving to zoom? IME it's the highest A/V quality and most reliable among the video conference apps. would a member company be willing to always host zooms? |
16:03 | <Rob Palmer> | Chairs are planning to switch to a new Jitsi server at the break. |
16:03 | <shu> | we can, but need to get exceptions |
16:03 | <shu> | (for the native client) |
16:03 | <snek> | rip 8x8.vc |
16:03 | <ryzokuken> | I mean, I think they're just having a bad server day probably |
16:04 | <ljharb> | yesterday too, but yeah it happens |
16:04 | <mpcsh> | right my concern is 8x8 has been noticeably less reliable than alternatives, IME |
16:16 | <littledan> | +1 to opinionated design! |
16:17 | <Justin Ridgewell> | I'd love to start using Google Meet again. |
16:17 | <waldemar> | bakkot, ljharb: I'm fine with stage 2 for duplicate named capture groups. The remaining discussion issue is the property creation order issue. I'd prefer the order to be fixed for a given regexp, not variable from invocation to invocation. Looks like some of you agree? |
16:18 | <rbuckton> | Grouped and Auto-Accessors advanced to Stage 1 in November, 2020: https://github.com/tc39/notes/blob/main/meetings/2020-11/nov-19.md#continuation-grouped-accessors-and-auto-accessors |
16:18 | <ljharb> | bakkot, ljharb: I'm fine with stage 2 for duplicate named capture groups. The remaining discussion issue is the property creation order issue. I'd prefer the order to be fixed for a given regexp, not variable from invocation to invocation. Looks like some of you agree? |
16:18 | <littledan> | bakkot, ljharb: I'm fine with stage 2 for duplicate named capture groups. The remaining discussion issue is the property creation order issue. I'd prefer the order to be fixed for a given regexp, not variable from invocation to invocation. Looks like some of you agree? |
16:18 | <bakkot> | already pushed a change doing that: https://github.com/tc39/ecma262/commit/34545fecc5583a35dbaa7b0f0f5eb532dd9faa63 |
16:18 | <littledan> | yay! |
16:19 | <waldemar> | littledan: My feedback is in https://github.com/bakkot/proposal-duplicate-named-capturing-groups/issues/3 |
16:20 | <bakkot> | littledan: basically as previously written, Object.keys(/(?<a>.)(?<b>.)|(?<b>.)(?<a>.)/.exec(foo).groups) would be either ['a', 'b'] or ['b', 'a'] depending on which alternative actually took part in the match |
16:20 | <bakkot> | now it's unconditionally the order in which the group names first appeared in the regex (here, ['a', 'b']) |
16:24 | <waldemar> | It was even weirder than that β if a named capture group never matched, it would be ordered as though it matched in the first place it appeared. |
16:24 | <bakkot> | sorry, yes |
16:24 | <waldemar> | But if it did match, it would be ordered in the place it matched. |
16:25 | <littledan> | well, I'm glad it's fixed |
16:30 | <littledan> | Is there going to be another topic about ShadowRealms? |
16:30 | <littledan> | or was that entirely handled yesterday |
16:30 | <ryzokuken> | littledan: that was withdrawn from the agenda |
16:30 | <ryzokuken> | it'll return in july |
16:31 | <littledan> | ah OK thanks |
16:33 | <waldemar> | @bakkot: Could we have a tiny update on duplicate named capture groups in the plenary to reflect the changes and resolutions we made here for the meeting notes? |
16:33 | <Michael Ficarra> | I still don't understand why we don't just allow any value to be a WeakMap key |
16:33 | <Michael Ficarra> | this is just going to force me to use a wrapper around a Map and a WeakMap and dispatch based on their type |
16:33 | <Michael Ficarra> | every time |
16:34 | <littledan> | Michael Ficarra: People have said in committee previously that WeakMap's current restriction was actually useful in helping them diagnose bugs |
16:35 | <littledan> | which I guess was the intention of their design in ES6 |
16:35 | <bakkot> | waldemar: I'll ask chairs if we can find a few minutes; if not I'll be sure to call it out during the presentation asking for stage 3 |
16:36 | <Rob Palmer> | yes, we have time to return to duplicae named capture groups |
16:37 | <bakkot> | it should only be ~5 minutes |
16:37 | <Michael Ficarra> | littledan: that tradeoff doesn't seem worth it; remember that we can't extend built-ins so using a wrapper means I opt out of getting to use new methods without updating my wrapper |
16:37 | <bakkot> | that's ok, WeakMaps don't have any methods |
16:37 | <bakkot> | and aren't going to get any |
16:37 | <bakkot> | probably |
16:38 | <Michael Ficarra> | sure, that particular point probably isn't as strong for WeakMaps in particular |
16:38 | <bakkot> | (actually I kind of want a WeakMap.clone) |
16:38 | <littledan> | it's always possible to extend built-ins, it's just that if there were methods, you'd need to override them if you wanted them to create subclass instances |
16:39 | <shu> | as a VM person i have a pretty visceral reactions to using Maps and WeakMaps interchangeably |
16:39 | <Michael Ficarra> | littledan: you weren't here for it, but at the last meeting we had a 2-hour discussion where the conclusion was basically to discourage extending built-ins because "you don't own them" and instead encourage wrapper patterns |
16:40 | <Michael Ficarra> | littledan: that's a topic that may be worth reviewing the notes |
16:40 | <littledan> | well, I don't disagree with the "should", I was responding to the "can't" |
16:43 | <littledan> | I'd register disagreement that anything a browser ships is web-compatible; it's a bit more subtle. But this is probably fine. |
16:43 | <littledan> | (it's possible to ship things that don't work!) |
16:44 | <Michael Ficarra> | WeakMap.isValidKey = () => true , there done |
16:44 | <littledan> | Michael Ficarra: yeah it should definitely dynamically look up the current value of that property, to support shims and such |
16:48 | <yulia> | are people seeing the slides? |
16:49 | <Michael Ficarra> | oh I didn't realise there were supposed to be slides |
16:49 | <yulia> | well, tabs |
16:49 | <yulia> | im not seeing what shu is showing |
16:49 | <ryzokuken> | I see the screen |
16:49 | <yulia> | ok |
16:49 | <yulia> | it may just be me |
16:49 | <rbuckton> | (actually I kind of want a WeakMap.clone) new WeakMap(oldWeakMap) (since you can "clone" a Map using new Map(oldMap) )? |
16:49 | <Michael Ficarra> | I just started seeing the share now |
16:56 | <Rob Palmer> | We are all now migrating to the Igalia Jitsi server |
16:56 | <Rob Palmer> | (don't post the URL here - I will put it on the Reflector |
16:57 | <Rob Palmer> | Has anyone had trouble switching? |
17:00 | <bakkot> | ljharb: while we're here, ping on https://github.com/tc39/template-for-proposals/pull/32 |
17:01 | <Luca Casonato> | (don't post the URL here - I will put it on the Reflector |
17:02 | <Rob Palmer> | https://github.com/tc39/Reflector/issues/430#issuecomment-1148934322 |
17:04 | <Luca Casonato> | Thank you |
17:04 | <ryzokuken> | (don't post the URL here - I will put it on the Reflector |
17:56 | <Rob Palmer> | Plenary resumes on the *new Jitsi server in 3 mins! |
18:04 | <Rob Palmer> | Could someone please visit the 8x8 server to redirect anyone that did not get the migration message? |
18:37 | <yulia> | it feels weird to use an editors note for this? or maybe i don't understand |
18:37 | <yulia> | but maybe the discussion has gone long enough... |
18:38 | <littledan> | sorry |
18:38 | <yulia> | unless the editors note is only for the unmerged state? |
18:38 | <littledan> | yes, that's what editors notes are |
18:38 | <yulia> | ah, ok |
18:38 | <littledan> | sorry for talking too long there |
18:38 | <yulia> | i think we also have editors notes elsewhere (or i recall seeing them) |
18:38 | <yulia> | but that might be me misremembering |
18:38 | <littledan> | well... that is different from my understanding of the intention, but I also wouldn't be shocked |
18:38 | <yulia> | probably misremembering |
18:39 | <ryzokuken> | tbf I think the effort involved here either way would be quite minimal as compared to class fields |
18:39 | <littledan> | the effort of splitting up the specs was not so big. Giving them coherent readmes and then talking about it with everyone later was the hard part. |
18:40 | <littledan> | I don't think we should make a habit of it. If we want to coordinate expectations around shipping part of a proposal, let's just say that's what we're doing |
18:40 | <ryzokuken> | in this case I'd just propose diff as normative changes to Temporal |
18:41 | <ryzokuken> | Temporal would need to depend on DurationFormat for Duration#toLocaleString anyway |
18:41 | <littledan> | back when some former committee members were around, it was difficult to get agreement on including certain notes. That's part of why editors notes were introduced, so drafts of proposals could have notes while they would be stripped in the final spec. Maybe that meaning got lost at some point. |
18:41 | <littledan> | Temporal would need to depend on DurationFormat for |
18:42 | <littledan> | since both things are at Stage 3, I think we're talking about a very minor detail and we shouldn't continue refactoring at this point, only handling it when merging into the main spec. |
18:42 | <littledan> | if you move text from one place to the other, references break, making it more difficult to read historical discussion |
18:42 | <ryzokuken> | fair |
18:42 | <ryzokuken> | my priority here is getting DurationFormat implemented soon |
18:43 | <ryzokuken> | for CLDR reasons |
18:43 | <littledan> | yeah, go for it |
18:43 | <littledan> | it's Stage 3 |
18:43 | <ryzokuken> | if it gets blocked on Temporal, implicitly or explicitly, that'd be a shame |
18:43 | <littledan> | if you want to delimit a subset of it, then you can do so, but that's an editorial change |
18:43 | <ljharb> | +1, it shouldn't get blocked on Temporal |
18:44 | <littledan> | it can be good to coordinate expectations about this subset, but I don't think this requires making a new repo, seeking consensus on advancement, etc |
18:44 | <littledan> | rather, it can just be, "hey, we delimited this subset. Implementers, does this seem good to ship separately, before that other part is done?" |
18:45 | <littledan> | this is my understanding of what our current process allows |
18:46 | <littledan> | (it'll still be shipping the feature partially, whether or not you call it a separate proposal or part of Temporal or anything. It'll have a separate line in MDN BCD, etc...) |
18:46 | <Richard Gibson> | the solution on slide 18 seems to make sense, in which observable behavior (specifically, objects are valid input while strings are not) is strictly weaker than Temporal and the spec text supporting that can be written with Temporal compatibility in mind but without an actual dependency upon new observable behavior introduced by Temporal |
18:48 | <Michael Ficarra> | I have to ask this every time, but: what was the reasoning behind generators stopping immediately when invoked instead of running until first yield? |
18:48 | <littledan> | rather, it can just be, "hey, we delimited this subset. Implementers, does this seem good to ship separately, before that other part is done?" |
18:49 | <ryzokuken> | Frank filed this as a bug, but I'm not sure if he'd be opposed to implement if we put in a note to make things clear |
18:49 | <littledan> | I have to ask this every time, but: what was the reasoning behind generators stopping immediately when invoked instead of running until first yield? |
18:50 | <yulia> | While i think we made some interesting decisions with generators, i don't think these examples are convincing me of the usecase here.. |
18:51 | <Michael Ficarra> | littledan: I'm aware, but there was a reasoning given, right? I don't remember what it was |
18:51 | <bakkot> | I have to ask this every time, but: what was the reasoning behind generators stopping immediately when invoked instead of running until first yield? gen() is the generator object itself |
18:51 | <bakkot> | ~~or, wait, that doesn't make sense~~ wait yes it does, this is all very hard to keep track of. |
18:53 | <Michael Ficarra> | oh okay yeah I think that was the motivation: you either miss the first next -ed value or you miss the first yield -ed value |
18:55 | <littledan> | it can be good to coordinate expectations about this subset, but I don't think this requires making a new repo, seeking consensus on advancement, etc |
18:56 | <littledan> | oh okay yeah I think that was the motivation: you either miss the first |
18:56 | <littledan> | FWIW http://web.archive.org/web/20160315061559/http://wiki.ecmascript.org/doku.php?id=harmony%3agenerators |
18:56 | <bakkot> | oh okay yeah I think that was the motivation: you either miss the first yield special (or the return , if it happens before any yield ) and stash the value somewhere to be returned upon the first call to next , but that's maybe too much magic |
18:57 | <Michael Ficarra> | well this function.sent proposal is from the same era, so I'm guessing that delegates at the time just assumed we would add something along these lines to fix this problem |
18:57 | <littledan> | well this |
18:58 | <littledan> | Andreas Rossberg was also a big proponent of function.sent |
18:59 | <bakkot> | the ~2 times this has ever come up for me I just said that you had to prime the generator with a throwaway call to .next() . any time you're passing stuff into the generator you're defining a new protocol anyway (the iterator protocol doesn't pass anything), so it's not so burdensome to make that be a part of the protocol. |
18:59 | <yulia> | the use of yield in this example with function.sent is surprising to me... What happens if we yield a value as well? |
18:59 | <yulia> | ah |
18:59 | <littledan> | for fun: http://web.archive.org/web/20140430210829/http://wiki.ecmascript.org/doku.php?id=harmony:generator_expressions |
18:59 | <shu> | the ~2 times this has ever come up for me I just said that you had to prime the generator with a throwaway call to prime() |
19:00 | <littledan> | (if one day we decide we want to be as cool as python) |
19:01 | <Michael Ficarra> | bakkot: can't you just expose a wrapper that does the priming instead? |
19:03 | <bakkot> | could've I guess |
19:03 | <bakkot> | it was a personal project so I don't think I bothered |
19:04 | <rbuckton> | bakkot: can't you just expose a wrapper that does the priming instead? generatorWithContext(function * (context, x, y) { console.log(context.sent) }) where generatorWithContext injects a { sent } context object in the first parameter would work too. |
19:08 | <snek> | what is the new syntax, i joined late |
19:09 | <Jack Works> | old: function.send |
19:09 | <Jack Works> | new: function* (...params) receives (binding) {} |
19:09 | <snek> | ic |
19:10 | <littledan> | In the old version of this, function.sent worked based on the [+yield] parameter, which makes it inaccessible in inner bindings |
19:10 | <littledan> | I agree that a magically changing binding would be pretty weird but at least it's visible when parsing from the outside in |
19:11 | <Mathieu Hofman> | My concern is when mixing with yield* in an async generator. Would a closure inside the async generator be able to observe the iteration to the delegated generator ? |
19:11 | <shu> | a live binding is pretty wild |
19:12 | <shu> | i'd strongly recommend it be non-closeable if so, but that's also an entirely new semantics |
19:12 | <littledan> | well, I was proposing a live binding with variable decorators... no one liked that, I guess for the same reason |
19:12 | <yulia> | i actually think that aliasing next with prime makes the most sense if we need to fix this.. |
19:12 | <Mathieu Hofman> | yeah a non-closable binding would be new |
19:13 | <snek> | live bindings are cool and we need more of them |
19:13 | <littledan> | I think the important thing is that it's very visible syntactically which bindings are so special, so we don't get another general with |
19:13 | <shu> | i also don't think the naming confusion about "sent" is enough to introduce something that feels so radical |
19:14 | <yulia> | im like really convinced about the alias, y'all |
19:16 | <Michael Ficarra> | yulia: I don't think the alias solves anything? |
19:16 | <yulia> | well, if people feel weird about priming using an empty next |
19:16 | <yulia> | it may improve readability also |
19:17 | <Michael Ficarra> | I don't think it's the empty next, it's the need to prime at all |
19:17 | <yulia> | hm, im not sure I am so convinced that this is such a huge issue though? |
19:17 | <yulia> | prime would give you a clear indication that this is a different protocol |
19:18 | <yulia> | and it feels proportional in terms of what this adds, in terms of cost to the language |
19:18 | <Michael Ficarra> | if anything, we could add a GeneratorFunction.prototype.autoprime so the consumer doesn't have to be aware of it |
19:18 | <yulia> | thats also a possibility -- i think if we do this, it should impact the writing of generators using this protocol as little as possible imo |
19:19 | <yulia> | i am concerned about the receive syntax, for the issues brought up by mhofman, though it was really interesting to see and a good experiment |
19:20 | <bakkot> | Something like |
19:20 | <bakkot> | (sorry ron! didn't realize that would ping you) |
19:22 | <Michael Ficarra> | stick it on GeneratorFunction.prototype, ship it |
19:23 | <Michael Ficarra> | call it something with bind in its name |
19:23 | <yulia> | wfm |
19:26 | <bakkot> | shu: I think generated code which has decided to both enable and disable a flag should be forced to handle that case explicitly; it is not obvious to me that defaulting to "it disables the flag" is obviously the intended thing for the code generator |
19:26 | <shu> | yeah that's fair |
19:27 | <bakkot> | guess I should say that out loud |
19:31 | <Richard Gibson> | oof, π π |
19:31 | <Richard Gibson> | but mea culpa |
19:45 | <rbuckton> | Shu, TS does not provide any runtime error. |
19:45 | <Michael Ficarra> | if we have dedicated syntax for methods, then what use will regular old functions serve? sounds like functions are now the de facto method syntax |
19:45 | <shu> | rbuckton: thanks |
19:46 | <shu> | the presentation made it sound like you did under the "runtime semantics aligned with TS/Flow" |
19:47 | <Jack Works> | I like this proposal, turn foogun/potential bugs into exceptions |
19:47 | <rbuckton> | TS erases the this parameter currently. Some of these runtime semantics would actually be in conflict with TS (i.e., potentially disallowing new F() ). |
19:47 | <shu> | yes that seems to very much work against the "narrow TS gap" motivation |
19:48 | <yulia> | oh, static methods with this is a bit weird? to me? |
19:48 | <Jack Works> | an interesting case would be:
|
19:48 | <rbuckton> | oh, static methods with this is a bit weird? to me? |
19:49 | <ryzokuken> | does this point to the constructor in static methods? |
19:49 | <rbuckton> | Yes |
19:49 | <Jack Works> |
function f(this) {} , it will fail when there is no this But if TS emits function f() {} , it require TS to emit different code based on the type |
19:49 | ryzokuken | unironically liked ruby's @@foo , @foo and $foo |
19:49 | <rbuckton> |
|
19:50 | <yulia> | ugh, right -- to call other methods |
19:51 | <rbuckton> | Also to access static private fields, though that can be a footgun w.r.t. inheritance (which is part of what the class. proposal was trying to address). |
19:53 | <yulia> | I see, thanks for the clarification |
19:54 | <keith_miller> | Richard Gibson: Oh, per my comment earlier today that we don't have substrings. I was wrong we do have them |
19:54 | <Jack Works> | yes that seems to very much work against the "narrow TS gap" motivation but as I can recall, the advance of type comment proposal require to reserve the syntax that might have RS. This proposal is a good example that the syntax can have a useful RS. |
19:55 | <danielrosenwasser> | RS? |
19:55 | <Jack Works> | runtime semantics |
19:55 | <shu> | that seems like circular reasoning. this is clearly widening the gap |
19:55 | <waldemar> | Yikes! Now we'd be introducing the concept of a function that can't ever be faithfully called via Function.prototype.call. |
19:56 | <shu> | that it satisfies a constraint someone else raised wrt the type annotations proposal doesn't trump the fact that it works against the stated goal of both proposals |
19:57 | <danielrosenwasser> | Not just that, but you now have to do more work to make something that is compatible with the type annotations proposal with something like this = undefined - which I think would be odd |
19:57 | <Jack Works> | for TS side it's easy, just add a emitThisParameter like what they did to the class fields |
19:57 | <rbuckton> | Yikes! Now we'd be introducing the concept of a function that can't ever be faithfully called via Function.prototype.call. class a "function" that can't be faithfully called by Function.prototype.call, or is your concern about the function keyword itself? |
19:58 | <shu> | danielrosenwasser: +1 |
19:58 | <danielrosenwasser> | for TS side it's easy, just add a |
19:58 | <danielrosenwasser> | more specifically, for users |
19:59 | <waldemar> | rbuckton: class is a keyword. I'm talking about a Function value f for which there is no way to do invoke the behavior of f() via Function.prototype.call. |
20:00 | <Justin Ridgewell> |
Isn't that because you allowed |
20:00 | <rbuckton> | My point is that typeof (class {}) is "function" , yet (class {}).call() will always fail. |
20:02 | <Jack Works> | Note, the change in class fields emit is an ongoing disaster for us because they both have runtime semantics and they're different in this case, only ES version has RS and TS version don't |
20:02 | <Jack Works> | it won't be so disaster like class fields |
20:03 | <waldemar> | rbuckton: I think you misunderstood my point. (class {})() fails in the same way. That's ok. What I don't like is a Function (with a regular call on its prototype) for which f() and f.call(undefined) have different behavior. |
20:03 | <rbuckton> | it won't be so disaster like class fields --emitThisParameter TS would need a different way to indicate a disallowed this or optional this , so its not quite as simple. |
20:04 | <danielrosenwasser> |
|
20:04 | <Jack Works> | This would introduce a runtime semantic that is in conflict with TS, so if there's a this?: T => no emit and this: T => has emit |
20:06 | <rbuckton> | You're also talking about hundreds of existing declaration files using this parameters with no way to disambiguate which --emitThisParameter they were compiled under. The conflicts this would cause are far beneath the surface. |
20:06 | <Jack Works> | if they have this declaration today, aren't they already expecting receiving a this ? π€ |
20:07 | <Jack Works> | unless they write this: T | null , then TS can emit this parameter cannot have be null if it is not marked with this?: |
20:07 | <rbuckton> | They aren't expecting runtime semantics, so there's no way to be 100% certain you wouldn't break someone. |
20:08 | <Jack Works> | if you don't flag that on by default, it won't accidentally break someone |
20:15 | <danielrosenwasser> | I think out-of-bound declaration files from Definitely Typed could become misleading at the least which is undesirable. Your build won't be broken, but the actual problem is the runtime behavior change which is generally seen as worse because there's no way to signal to a user "hey, this is now different" |
20:16 | <Jack Works> | I think out-of-bound declaration files from Definitely Typed could become misleading at the least which is undesirable. Your build won't be broken, but the actual problem is the runtime behavior change which is generally seen as worse because there's no way to signal to a user "hey, this is now different" this in .d.ts and you don't provide it, TS already report type error |
20:17 | <rbuckton> | I've merged the PR to disallow (?i-i:) for https://github.com/tc39/proposal-regexp-modifiers. All that remains is the pending reviews from waldemar and the TC39 editors. |
20:18 | <danielrosenwasser> | If a method expects The specific case in mind is the optional
|
20:19 | <Jack Works> |
|