Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • 9
    OK, that's valid. But if your minimizer is an actual parser it could insert them again as necessary. Or just not remove the linebreaks, => you keep the linebreaks, lose the semicolons, they're roughly the same number so there's nothing lost. Commented Aug 7, 2011 at 13:55
  • 2
    @Einar Egilsson Closure Compiler indeed does this. Commented Aug 7, 2011 at 15:42
  • 2
    All things being equal, a newline is the same number of bytes as a semicolon. Your minimizer may strip all new lines, but then requires there to be semicolons. It's an even exchange. Commented Aug 7, 2011 at 17:19
  • 4
    @Logan: That's assuming one byte newlines, of course ;-) Commented Aug 7, 2011 at 17:36
  • 1
    Of course, if we used Python instead of Javascript, we'd have to code WAY less to do the same thing, so the fact that semi-colons use a few bytes less than indentation is a moot point. Commented Aug 8, 2011 at 7:11