20:38
<devsnek>
why do tagged templates not use an array for the expressions
20:46
<Bakkot>
presumably because a given template has only a fixed number of expressions
20:46
<Bakkot>
which makes it more like a function call
20:46
<Bakkot>
easy enough to do `tag(strings, ...exps)` to get the array if you want it
20:48
<devsnek>
yeah i know you can spread
20:48
<devsnek>
i don't think the design is bad or anything
20:48
<devsnek>
just a curiosity
21:01
<Bakkot>
yeah, that's my guess
21:02
<Bakkot>
it's for cases like "console.log(employee`${name} is a level ${level} employee`)" or whatever
21:02
<Bakkot>
*optimized for
21:26
<TabAtkins>
Bakkot: I don't understand what optimization you're indicating there.
21:27
<Bakkot>
TabAtkins not like a performance optimization
21:27
<Bakkot>
I mean if the case you care most about is the case where the tag is expected to be used with a fixed number of expressions, then you would have each expression be its own argument to the function (as is in fact the case)
21:28
<Bakkot>
as opposed to the case where the tag is expected to be used with an arbitrary number of expressions, in which case you would have all the expressions wrapped up in an array
21:29
<ljharb>
this api design does preclude any future additional arguments to the tag function, tho.
21:30
<Bakkot>
you can just hang the new arguments as properties of the array which is the first argument :P
21:31
<Bakkot>
(this is ugly but it's also what we actually do, for `raw`)
21:31
<ljharb>
ugh, i forgot we repeated the match object mistake there too
22:23
<Bakkot>
jmdyck: where does LR_Parser come from in https://github.com/jmdyck/ecmaspeak-py/blob/0d82b85e4dd433def0ca9ec3384d380762bcabf2/Pseudocode_Parser.py#L10 ?
22:23
<Bakkot>
that does not appear to be the name of a package pip knows about
22:46
<devsnek>
ljharb: is there anything else that https://github.com/tc39/ecma262/pull/1669 needs?
23:06
<ljharb>
devsnek: nope, not as of today, thanks for the ping
23:14
<jmdyck>
Bakkot: LR_Parser is another thing I wrote.
23:15
<Bakkot>
jmdyck: that's what I figured; does it exist somewhere? I'm trying to run ecmaspeak-py, and it doesn't work without it.
23:16
<jmdyck>
guess i'll have to publish it then
23:22
<Bakkot>
jmdyck thanks!
23:23
<Bakkot>
if you're planning doing so soon, let me know when it's up?
23:23
<jmdyck>
k