16:28
<Jack Works>
question: why terser prefer , than ;
16:28
<Jack Works>
export function x() {
    a()
    b()
    c()
}
16:29
<Jack Works>

why

export function x(){a(),b(),c()}

not

export function x(){a();b();c()}
16:40
<bakkot>

Jack Works: probably because it works better in other contexts:

if (foo) {
  a();
  b();
  c():
}

can be minimized to if(foo)a(),b(),c()

16:41
<bakkot>
so if you're writing a minimizer you just have a rule which says that sequences of expression statements get collapsed with ,, and then after having applied that rule sometimes you can eliminate {}s, whereas there's no place where using ; instead of , is a benefit
17:32
<Jack Works>
oh, interesting
17:32
<Jack Works>
(because , is somehow harder to debug in devtools so I don't like it)
17:35
<bakkot>
https://unminify.io/ :)
17:36
<bakkot>
I haven't updated that in... I guess probably 5 years so it won't handle newer syntax
17:36
<bakkot>
but it does reverse that specific transform, among others
17:48
<Jack Works>
terser has an option to disable comma transform actually
18:33
<eemeli>
Isn't it obvious that , is about half the size of ;? </tdz>