15:30
<jschoi>
https://github.com/tc39/proposal-record-tuple/issues/10#issuecomment-993130019
15:30
<jschoi>
Looks like a record/tuple champion is still willing to consider @[ … ], [| … |], and [| … ] as alternatives to #[ … ]. So # as the topic reference is still in the running.
16:38
<Nicolò>
I prefer #[ over [|, but I also prefer |> #over the two-tokens alternatives 😂 We could also just live with the conflict.|> #[0]will be a syntax error because the topic token is not used, and you will have to write|> (#)[0]. The only silent bug is when you want to use #twice and only once it's in a computed property access (for example,|> #[#.length - 1], but it doesn't feel common: this is the only realistic example I could come up with, but we now have #.at(-1).
16:39
<jschoi>
What about @[?
16:39
<jschoi>
(I will also say that I expect #[0] to actually be fairly common. At least for me. I would do it often.)
16:39
<Nicolò>
It's slightly worse than #[ because @(,@[ and @{ look related but @( is a completely different thing
16:40
<Nicolò>
Yes but you would get a syntax error and not a runtime bug
16:41
<Nicolò>
Btw, would @ work for pipes too? (searching in the long issue about topic bikeshedding doesn't help because it finds all the usernames)
16:41
<jschoi>
It's slightly worse than #[ because @(,@[ and @{ look related but @( is a completely different thing
Well, is @( really that big of a deal? Since @( won’t be very common…
16:41
<jschoi>
…and decorators and records/tuples will not be closely mixed often.
16:42
<Nicolò>
Well, is @( really that big of a deal? Since @( won’t be very common…
No, that's why I said slightly 😛
16:42
<jschoi>
In contrast, private fields and records/tuples may well be mixed often. I give an example in that comment I link above.
16:42
<jschoi>
Yeah, haha.
16:42
<jschoi>
All of these slight trade offs…
16:42
<Nicolò>
@[ is definitely better than [|, at least for me (single char rather than two to move from arrays to tuples)
16:42
<jschoi>
@ does not work for pipes because of @()’s ambiguity with decorators.
16:43
<jschoi>
Although, yes, we could do the same thing as you suggest with # and force parentheses for the function call (@)(). I do not much like this sort of solution though.
16:43
<Nicolò>
Because of ASI?
16:43
<jschoi>
I believe so, although I need to double check.
16:44
<Nicolò>

Uh ok

x |> @(1)

class A {} 
16:44
<jschoi>
Yes.
16:44
<Nicolò>

It's the same kind of ambiguity as

1

[x]
16:44
<Nicolò>
Where you are forced to put a semicolon
16:45
<jschoi>
Yep.
(Also there’s Getify’s suggestion of [| … ], so yeah. But I do like @[ … ].)
16:45
<Nicolò>
I prefer @[ because [|...] seems visually unbalanced
16:45
<jschoi>
Yes, it does look visually unbalanced.
16:47
<jschoi>
By the way, Nicolò, did you want me to rebase that Babel pull request for ^^ and @@?
16:47
<jschoi>
Since you were waiting on that decorators call.
16:48
<Nicolò>
Since you were waiting on that decorators call.
Whops sorry
16:48
<Nicolò>
I want to wait to see what the committee says about @init:
16:48
<jschoi>
Ah, the plenary today, okay.
16:48
<jschoi>
Sounds good.
16:48
<Nicolò>
Tomorrow I think
16:48
<jschoi>
We will see. The schedule is packed indeed…
16:49
<jschoi>
I’ll also start work on support for Babel records-and-tuples support for @[ … ] sometime.
18:31
<TabAtkins>
(I will also say that I expect #[0] to actually be fairly common. At least for me. I would do it often.)
Yes, I think #[...] will be too common of an expression for us to allow it to be a syntax error.
18:32
<TabAtkins>
Wait, is tuples seriously considering [|...] as an option, rather than [|...|]???
18:32
<TabAtkins>
That seems untenable personally
18:32
<nicolo-ribaudo>
Nope, it is just one of the options mentioned in the R&T syntax thread (not by a champion)
18:34
<TabAtkins>
okay, phew
18:35
<jschoi>
@tuple [ … ] >:)
18:42
<jschoi>
Actually, no, even better: [ … |].
18:42
<TabAtkins>
Extend all the things via keywords. @tuple [...] for tuples, @topic for pipeline, there are no downsides.
18:43
<TabAtkins>
Actually, no, even better: [ … |].
luv2see unbounded lookahead
19:29
<jschoi>
Nice, Tab.