3 ms·
> Fair enough, the common case is minification and concatenation. Or what else is it? The problem with the semicolon remains. If it is minification, then you a
by dozzie 9y ago
> Fair enough, the common case is minification and concatenation. Or what else is it? The problem with the semicolon remains.
If it is minification, then you already have a tool that process the code.
The tool can easily just add the missing colon before concatenation.
- galacticpony2 9y agoThe tool that does the minification isn't necessarily the same tool that does the concatenation. Here's a very lengthy discussion on how the very popular minifier UglifyJS (version 1) originally removed trailing semicolons, causing this exact problem: https://web.archive.org/web/20130319222210/https://github.com/mishoo/UglifyJS/issues/126 https://web.archive.org/web/20130319222210/https://github.co... In the real world, it's irrelevant what tools could be reasonably expected to do. What matters is what they actually do. Expecting your tools to insert semicolons for you is the path that leads to peril.