3 ms·
I do wish we could go back to how things were in the early 00s where view source on any page was extremely telling and would show you cleanly formatted code. A
by sam0x17 3y ago
I do wish we could go back to how things were in the early 00s where view source on any page was extremely telling and would show you cleanly formatted code.
Another huge reason for the status quo is a lot of companies actively try to obfuscate their frontend code for a variety of reasons, and a lot unwittingly do it as part of minification to squeeze out a little bit of extra efficiency both in terms of payload size and parsing time for clients (every token counts!).
That said, I would love a world where the de-jure frontend syntax was less ambiguous to the point where minification is essentially a lossless operation other than the actual names of things.
At the browser level we have to make the decision: do we want clients to be able to figure exactly what is running in their browser? If the answer is no, the current situation is great, if the answer is yes, the current situation is pretty bleak, and will actually get bleaker with the advent of WASM-based payloads where we now need to disassemble on top of everything else.
- FerretFred 3y ago> view source on any page was extremely telling Yeah! This was basically how I taught myself to write effective HTML. Great fun!
- joemi 3y ago> to the point where minification is essentially a lossless operation other than the actual names of things. Is that not the case now? I don't do a lot with javascript myself, but I always assumed the minification process wasn't changing the code itself.
- 8n4vidtmkvmk 3y agoIt will shorten variable names, replace true with !0 and many other things. Newer technology might even unroll loops to improve performance but that's a bit different.