Hacker Newsnew | comments | show | ask | jobs | submit login

How is formatting "easily lost" merely by virtue of being used as a web scripting language? There's nothing that mangles whitespace of anything delivered over HTTP. Yes, if you include it directly in HTML for display without any kind of escaping, the whitespace will be collapsed. But if you'll notice, JavaScript is the current web scripting language, and it has significant whitespace (line endings). So it's not like having significant whitespace makes it unsuitable for the web.



Javascript is frequently stripped of all whitespace as part of the minification process. This includes removing all newlines and indentation. This would a good bit harder with Python.

-----


Yes, they'd have to come up with something else to get equivalent results from minification, like a special minified dialect where whitespace characters are replaced with another unused symbol (perhaps a canary-type header like the coding: thing). If this is determined infeasible they'd probably just have to accept that the whitespace needs to be transferred, which honestly I wouldn't really consider a bad thing.

Minification should not be considered as a major reason to forgo the benefits of alternate scripting languages.

-----




Guidelines | FAQ | Support | API | Lists | Bookmarklet | DMCA | Y Combinator | Apply | Contact

Search: