00:30:19  * keith_mi_joined
00:39:45  * keith_mi_quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:00:59  * Jessidhiajoined
01:02:47  * laughinghanquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:47:51  * keith_mi_joined
01:56:28  * keith_mi_quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
02:04:27  * Jessidhiaquit (Disconnected by services)
02:04:42  * Jessidhiajoined
02:07:12  * laughinghanjoined
02:07:48  * laughinghanquit (Client Quit)
02:08:54  * AtumTquit (Quit: AtumT)
02:10:41  * keith_mi_joined
02:12:35  * keith_m__joined
02:15:01  * keith_mi_quit (Ping timeout: 245 seconds)
02:32:58  * keith_m__quit (Ping timeout: 245 seconds)
02:34:53  * keith_mi_joined
02:39:44  * keith_mi_quit (Ping timeout: 268 seconds)
02:41:16  * keith_mi_joined
02:49:34  * laughinghanjoined
02:51:41  * keith_mi_quit (Ping timeout: 245 seconds)
02:53:58  * keith_mi_joined
03:00:28  * keith_mi_quit (Ping timeout: 245 seconds)
03:02:30  * cloudshuquit (Quit: Connection closed for inactivity)
03:03:02  * keith_mi_joined
03:09:22  * laughinghanquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
03:14:24  * keith_mi_quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
05:23:48  * jmdyckquit (Remote host closed the connection)
05:27:25  * Jessidhiaquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
05:28:15  * Jessidhiajoined
05:30:20  * Jessidhiaquit (Client Quit)
06:43:06  * Jessidhiajoined
06:49:20  * Jessidhiaquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:55:27  * Jessidhiajoined
09:21:07  * jmdyckjoined
11:24:06  * itamarokjoined
11:39:18  * itamarokquit (Remote host closed the connection)
11:39:59  * itamarokjoined
11:44:13  * itamarokquit (Remote host closed the connection)
11:50:07  * itamarokjoined
11:55:28  * itamarokquit (Remote host closed the connection)
12:01:44  * itamarokjoined
12:01:45  * itamarokquit (Remote host closed the connection)
12:02:01  * itamarokjoined
12:15:57  * itamarokquit (Remote host closed the connection)
12:16:18  * itamarokjoined
12:44:29  * itamarokquit (Remote host closed the connection)
14:17:00  * itamarokjoined
14:21:18  * itamarokquit (Remote host closed the connection)
14:30:38  * itamarokjoined
14:30:57  * itamarok_joined
14:31:09  * itamarokquit (Remote host closed the connection)
14:43:10  * itamarok_quit (Remote host closed the connection)
14:52:56  * itamarokjoined
14:53:00  * itamarokquit (Remote host closed the connection)
14:53:14  * itamarokjoined
15:27:12  * cloudshujoined
15:58:13  * itamarokquit (Remote host closed the connection)
16:01:16  * obensourcequit (Ping timeout: 245 seconds)
16:15:16  * obensourcejoined
16:25:04  * AtumTjoined
16:26:02  * Nimelrianjoined
16:32:47  * cybaijoined
16:49:55  * keith_mi_joined
16:50:23  * keith_mi_quit (Remote host closed the connection)
16:51:01  * keith_mi_joined
16:55:20  * itamarokjoined
17:01:06  * keith_mi_quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
17:09:45  * itamarokquit (Remote host closed the connection)
17:12:10  * keith_mi_joined
17:15:26  * itamarokjoined
17:19:38  * itamarokquit (Ping timeout: 245 seconds)
17:23:55  * underikar_quit
17:24:36  * underikarjoined
17:32:54  * jwalden_joined
17:32:58  * jwalden_quit (Client Quit)
17:42:20  * keith_mi_quit (Remote host closed the connection)
17:42:44  * keith_mi_joined
17:46:36  * itamarokjoined
17:48:43  <keith_mi_>Does anyone know if anyone has proposed a if (let myVariable = ...) { } syntax before?
17:48:45  <keith_mi_>I couldn't find anything.
17:51:05  * itamarokquit (Ping timeout: 258 seconds)
17:55:13  <rkirsling>interesting...would be surprising if it were never discussed, given its existence in other langs 🤔
18:02:05  <devsnek>keith_mi_: what's the `...`
18:02:25  <devsnek>usually `if let` is part of pattern matching right?
18:02:30  <keith_mi_>devsnek: Some expression that you want to bind
18:02:56  <keith_mi_>like if (let foo = bar.baz())
18:03:05  <cloudshu>keith_mi_: spidermonkey used to have let expressions but not quite that form i don't think
18:03:27  <keith_mi_>basically any RHS expression
18:03:44  <keith_mi_>ok, I make a proposal then
18:04:02  <devsnek>is this always truthy?
18:04:04  <devsnek>always falsy?
18:04:09  <cloudshu>it looks real odd by today's standards `let (x = y) z`
18:04:38  <cloudshu>what is always truthy or always falsy?
18:04:43  <devsnek>like
18:04:48  <devsnek>when does this if block run
18:04:51  <keith_mi_>it's truthy if the RHS is truthy
18:04:57  <cloudshu>yeah, like in C i imagine
18:05:06  <devsnek>i wasn't aware this was a thing in C
18:05:09  <devsnek>but ok
18:05:16  <cloudshu>if (let foo = bar()) runs when bar() is truthy
18:05:22  <keith_mi_>it's sugar for { let variable = expression; if (variable) { ... } }
18:05:27  <devsnek>ok
18:05:33  <cloudshu>keith_mi_: real talk do you want the binding to be available in the else branch
18:05:39  <keith_mi_>no
18:05:42  <cloudshu>o really
18:05:52  <devsnek>would interact weirdly with `else if (let`
18:05:52  <keith_mi_>I mean that's not how any other language does it
18:06:02  <devsnek>you'd just stack up declarations
18:06:16  <keith_mi_>I guess it's not quite sugar then...
18:06:18  <keith_mi_>but yeah
18:06:44  <rkirsling>I mean we're just talking about https://doc.rust-lang.org/reference/expressions/if-expr.html#if-let-expressions, yeah?
18:06:59  <devsnek>no
18:07:05  <devsnek>that's what i thought this was too
18:07:09  <rkirsling>except for the parens difference and the expression difference
18:07:10  <keith_mi_>no that's doing destructuring
18:07:20  <cloudshu>keith_mi_: that breaks with c
18:07:22  <keith_mi_>which you could do here possibly
18:07:25  <cloudshu>keith_mi_: in c the binding is available in both branches
18:07:32  <keith_mi_>wait really?
18:08:19  <keith_mi_>oh wow...
18:09:09  <keith_mi_>idk I'm neutral on it being on both sides
18:09:34  <rkirsling>er sorry, I guess Rust is hard to compare with since do exprs and pattern matching are outstanding, but lemme rephrase
18:09:44  <devsnek>c isn't exactly a gold standard of language design
18:10:04  <rkirsling>we're talking about C++17 "if auto", right?
18:10:26  <ljharb>it seems gross to me to further conflate assignment with expressions
18:10:28  <keith_mi_>If we ever had a pattern matching proposal we could choose something else to indicate you wanted a pattern match here
18:10:32  <devsnek>`if (type = x`
18:10:36  <devsnek>type could be auto
18:10:44  <ljharb>i'd rather see us make assignments become statements if it were web compat :-)
18:11:05  <devsnek>something something `let` reserved keyword
18:11:26  <rkirsling>hmm yeah I'm inclined to agree that if we did this it should be after Kat and Dave get their stuff through :P
18:11:44  * keith_mi_quit (Remote host closed the connection)
18:11:51  <rkirsling>😱
18:12:01  * keith_mi_joined
18:12:25  <devsnek>is the matching proposal still weird
18:12:53  <zkat>the pattern matching proposal mentions things like `if let`, iirc
18:13:00  * Nimelrianquit (Ping timeout: 258 seconds)
18:13:12  <devsnek>i just want matching as an expression
18:13:12  <zkat>devsnek: what was weird about it? It's recently been updated, to support expressions.
18:13:23  <devsnek>oh ok
18:13:25  <zkat>then yes, there's expressions, in a limited sense, thanks to littledan
18:13:39  <devsnek>just using the entire match as an expression was what i wanted
18:13:45  <zkat>check out https://github.com/tc39/proposal-pattern-matching#motivating-examples
18:13:50  <devsnek>yea just saw that
18:13:52  <devsnek>🎉
18:13:57  <zkat>does that look like enough to you?
18:14:12  <devsnek>looks more or less like what i imagined
18:14:17  <devsnek>i'm kinda spoiled by rust though
18:14:18  <zkat>like, not being able to do general-purpose expressions (so if you're in "expression mode", you can't use keywords and statements in legs)
18:14:42  <devsnek>is that a left hand side expression
18:14:59  <zkat>hm?
18:15:15  <devsnek>the grammar of the expression side
18:15:25  <devsnek>you said its not general-purpose expressions
18:15:36  <rkirsling>seems like this bit is potentially directly relevant: https://github.com/tc39/proposal-pattern-matching/blob/latest/TO_INFINITY_AND_BEYOND.md#--if-case-convenience-sugar
18:15:47  <devsnek>like has it been settled which expression production it is
18:16:18  * keith_mi_quit (Ping timeout: 245 seconds)
18:21:39  <zkat>I haven't messed with the grammar bits yet, no
18:23:15  * keith_mi_joined
18:23:36  <keith_mi_>sorry had to get off the bus
18:27:00  <devsnek>zkat: is `~x` a placeholder for `->`
18:27:23  <devsnek>wait no that doesn't make sense
18:27:38  <zkat>no, that was a reference to a now-dropped subproposal for extensible patterns
18:27:53  <devsnek>oh ok
18:28:38  <zkat>which might be replaces with `NewExpression`/`CallExpression` inversion, as in https://github.com/tc39/proposal-pattern-matching/issues/117
18:30:05  * keith_m__joined
18:32:40  * keith_mi_quit (Ping timeout: 252 seconds)
18:39:27  <keith_m__>ljharb: While it's usually a bad idea to do assignment as an expression (I agree with you), I'm not convinced that would be a problem here.
18:39:45  <keith_m__>my argument is there can only be one lexical assignment per if condition
18:40:03  <ljharb>keith_m__: and what if you want two tho? like `const { foo } = obj; let { bar } = obj`
18:40:16  <keith_m__>that would be a syntax error
18:40:18  <ljharb>or even `const { foo, bar } = obj`
18:40:30  <keith_m__>well that's destructuring so I'd be ok with that
18:41:03  <ljharb>ok so, the limitation of destructuring not allowing mixing let/const is "fine" because you can do 2 statements - but if there's a place where you can only do one, that will likely present a problem
18:41:03  <devsnek>why not `for (let a = b(); a;;) {}`
18:41:07  <devsnek>:P
18:41:37  <keith_m__>isn't that an infinite loop?
18:41:44  <devsnek>oh yeah
18:41:45  <devsnek>lol
18:42:07  <devsnek>my thought process stopped at "yeah this would run and not run"
18:42:12  <keith_m__>you also can't have an else
18:43:21  <keith_m__>ljharb: Destructuring is also a bit weird because it's somewhat unclear what the conditional is?
18:43:52  <keith_m__>is it the fact that the destructuring "succeeded"? Or that the RHS is actually an object?
18:44:01  * laughinghanjoined
18:44:08  <keith_m__>so maybe destructuring is a bad choice
18:44:15  <devsnek>if destructuring doesn't succeed it throws
18:44:28  <keith_m__>I mean maybe you don't want that behavior here?
18:44:34  <devsnek>but yeah that is getting into matching territory
18:44:39  <keith_m__>fair
18:45:12  <keith_m__>Also, you could do two statements for destructuring here
18:45:17  <devsnek>`#pragma match` or `#pragma destructure` ftfy
18:45:55  <ljharb>keith_m__: right, so then you block destructuring in an `if`, and now you have a weird sub-form of assignment
18:45:57  <keith_m__>since you could do if (let { foo } = obj) { const { bar } = obj; }
18:46:37  <keith_m__>but I think it's worth exploring what the different semantics could be
18:48:20  <keith_m__>anywho I will make a proposal unless people think it's beating a dead horse
18:50:18  <ljharb>keith_m__: i'd search esdiscuss first for previous discussions on it
18:50:32  <keith_m__>I did some googling and couldn't find anything
18:53:54  * laughinghanquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:00:03  * cybaiquit (Remote host closed the connection)
19:03:25  * cybaijoined
19:04:05  * keith_m__quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:06:34  <rkirsling>definitely seems like a worth problem space to bring up in session
19:07:44  * cybaiquit (Ping timeout: 248 seconds)
19:09:03  * Nimelrianjoined
19:15:27  <cloudshu>late reply: i think "c's not a great language to emulate" is more an argument for not having `if (let foo = bar)` the available-in-both-branches thing
19:16:00  <cloudshu>if we're to have the form, it'd be weird to diverge imo
19:16:54  <Bakkot>I don't think this syntax is worth it, in honesty
19:18:12  <cloudshu>i'm like a weak agree on it not being worth it
19:18:21  <cloudshu>i do use the form in c++ fairly frequently
19:19:07  * cybaijoined
19:23:28  * cybaiquit (Ping timeout: 246 seconds)
19:40:47  * cybaijoined
19:42:48  <devsnek>i never even knew it existed
19:43:00  <devsnek>but same agreement as cloudshu
19:49:49  * cybaiquit (Remote host closed the connection)
20:05:01  * keith_mi_joined
20:09:48  * laughinghanjoined
20:12:48  * Nimelrianquit (Ping timeout: 252 seconds)
20:34:19  <Bakkot>also, previous discussions: https://esdiscuss.org/topic/proposal-if-variable-initialization https://esdiscuss.org/topic/proposal-let-in-if-parentheses
21:02:16  * itamarokjoined
21:03:31  <oliverdunk>I think I'm understanding the fetch spec right, but just to check - is it intended then when fetching a resource with {redirect: "manual"}, the response type is always "cors" (even with Access-Control-Allow-Origin set to *), unless there's a redirect, in which case the response type is "opaqueredirect"?
21:08:04  <rkirsling>oliverdunk: I think you'd have to talk to WHATWG about fetch; it's not part of the language spec
21:08:27  <oliverdunk>Gotcha, that makes sense rkirsling.
21:08:34  * itamarokquit (Remote host closed the connection)
21:11:19  * itamarokjoined
21:28:15  * cybaijoined
21:29:33  * cybaiquit (Remote host closed the connection)
21:30:58  * cybaijoined
21:32:23  * itamarokquit (Remote host closed the connection)
21:34:25  * cybaiquit (Remote host closed the connection)
21:42:49  <Bakkot>gh-1158 is merged! :hooray:
21:44:38  <Bakkot>getting archive.is/TeTng fixed has been on my todo list for _three years_
21:45:58  <rkirsling>wow, that's the first time I've actually viewed that site
22:30:08  * keith_mi_quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:39:51  <devsnek>just watched cj's talk at jsconf
22:40:11  <devsnek>reminds me of the arguments in the std proposal
22:40:18  * keith_mi_joined
22:40:43  <rkirsling>the energy of being in the front row for that and not knowing what was coming, man. it was really something
22:41:54  <rkirsling>but yeah there's a common theme in the ether, I think
22:59:56  * laughinghanquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:15:36  * cybaijoined
23:17:19  * cybai_joined
23:20:36  * cybaiquit (Ping timeout: 272 seconds)
23:21:49  * cybai_quit (Ping timeout: 246 seconds)
23:31:35  * keith_mi_quit (Quit: My MacBook has gone to sleep. ZZZzzz…)