Hacker News new | ask | show | jobs
by skybrian 837 days ago
I wonder if this would be a good alternative to minimizing JavaScript and having separate sourcemaps?
2 comments

Not really.

Compressing JavaScript already gives you tonnes of benefits, but syntax-aware compression (modify js) gives you more.

Besides, this is a form of more efficient caching on that it only benefits subsequent visits.

JS minification will probably never die, because it makes parsing meaningfully faster.
the fact that the default on the web is to ship something that needs a parser is very silly.
Depending on how you look at it, Java, .NET and WebAssembly all need parsers too, they just happen to be parsing a binary format instead of text.
yes, and technically so does x86, but there's a pretty big difference between formats where the data is normalized and expected to be correct and formats that are intended for users and need to do things like name resolution and error checking. Parsing a language made for machines is easy to do faster than you can read the data from ram, while parsing a high level language will often happen at <100mbps