01:21
<Rick Waldron>
Do people remember the reasons why named argument syntax was rejected in JS? A la foo(argname: 1, arg2name: 2)?

I don't remember why, it was dead before I ever started attending meetings. Either way, it's a non-starter now because...

The Syntactic Grammar must not be extended in any manner that allows the token : to immediately follow source text that is matched by the BindingIdentifier nonterminal symbol.

01:22
<Rick Waldron>

Mathieu Hofman: to your point ^^

I could see conflicts with type systems which also use :

01:23
<Rick Waldron>
That Forbidden Extension was written exactly for the case you mention
02:18
<jschoi>

I don't remember why, it was dead before I ever started attending meetings. Either way, it's a non-starter now because...

The Syntactic Grammar must not be extended in any manner that allows the token : to immediately follow source text that is matched by the BindingIdentifier nonterminal symbol.

Huh! I had not known this was a thing. When was it added? Is it specifically to accommodate future ES type-like annotation, or is it specifically for ES extensions like TypeScript and Flow…?
02:42
<bakkot>
strictly speaking, forbidden extensions constrain implementations, not us. we could write this into the spec and then implementations could ship it and that would be kosher. the point (as I understand it) is to prevent stuff like happened in the earlier eras when browsers would ship new syntax without it being in the spec (like function declarations in blocks, for example), and then we'd be stuck with it forever
02:43
<bakkot>
that said, we probably should not ship param: x unless it means roughly what it does in TS.
02:49
<Justin Ridgewell>
Does TS have param: x at call sites? I thought it was only function definition
02:51
<bakkot>
yeah, true
02:54
<Mathieu Hofman>
wouldn't you need at definition too for named argument? I understand you may not need it for explicit receiver
02:55
<Mathieu Hofman>
(Btw, I actually like that TS unlike Flow has the ability to type the this in function declarations, I wish it was more thoroughly leveraged though)
10:29
<yulia>
re groupBy Justin Ridgewell we have another report involving the sugar.js library: https://github.com/webcompat/web-bugs/issues/98458
14:37
<Rick Waldron>
Huh! I had not known this was a thing. When was it added? Is it specifically to accommodate future ES type-like annotation, or is it specifically for ES extensions like TypeScript and Flow…?
September 2014! Here's the meeting notes conclusion/resolution: https://github.com/tc39/notes/blob/8711614630f631cb51dfb803caa087bedfc051a3/meetings/2014-09/sept-25.md#conclusionresolution-2 and the topic starts here: https://github.com/tc39/notes/blob/8711614630f631cb51dfb803caa087bedfc051a3/meetings/2014-09/sept-25.md#types
14:39
<jschoi>

Reserve syntax used by TypeScript, Flow, etc. for some form of annotation

14:39
<jschoi>
There it is, hmmm.
14:40
<jschoi>
I’m reminded of rbuckton’s withdrawn request to reserve @@ syntax for extension languages’ decorators.
14:41
<Rick Waldron>
strictly speaking, forbidden extensions constrain implementations, not us. we could write this into the spec and then implementations could ship it and that would be kosher. the point (as I understand it) is to prevent stuff like happened in the earlier eras when browsers would ship new syntax without it being in the spec (like function declarations in blocks, for example), and then we'd be stuck with it forever
It's actually both: Yes, to your point as stated here, but back in 2014 there was still a strong desire to ensure that TypeScript, Flow, etc were strict supersets of JavaScript. If JS suddenly made named parameters, then that would become exceptionally hard. I'm not even sure if that's still true of those systems, or still a goal, or what.
20:19
<ljharb>
fwiw it's never been true of those systems (maybe flow, but i haven't looked at it in awhile), but i think it's still a stated goal
22:39
<gkz>
(Btw, I actually like that TS unlike Flow has the ability to type the this in function declarations, I wish it was more thoroughly leveraged though)
Flow also has this ability... https://flow.org/try/#0PQKgBAAgZgNg9gdzCYAoVUCuA7AxgFwEs5swoAKfAC0IGcAuMAbwENHb8AnQ7AcwF8ANGAAejbJgC2AIwCmnAJTNUYMNToA6EdoDcYYMDABRAEomA8iZVhOs-Jk6l1tDSw20YhXLPIiFegzBzAGlUfiA
22:44
<Mathieu Hofman>
Is that new? Last I checked, and according to https://github.com/niieani/typescript-vs-flowtype#declarable-arbitrary-this-in-functions-outside-of-objects, it was a TS only feature
22:45
<gkz>
that file was last updated 2 years ago
22:46
<gkz>
I would consider it largely inaccurate and would not use it as a source of information
22:47
<Mathieu Hofman>
Well arguably I've not looked at flow closely in about a year. But I do not remember about this feature. Wondering when it was added. Maybe we were stuck on an older flow version in the codebase I worked on at the time. Anyway, glad it's there now, and I retract that specific flow complaint
22:49
<gkz>
Improved typing of this was announced last year: https://medium.com/flow-type/sound-typing-for-this-in-flow-d62db2af969e
22:50
<Mathieu Hofman>
Just saw that, yeah that's after last time I looked into flow
22:51
<Mathieu Hofman>
And it looks like flow is being a lot stricter about this than TS, which is a + IMO