News for hackers. Stuff that matters.
Re:Brython, Python in the browser by mdellavo on Tuesday January 29, 2013 @10:30AM (#5134490)
I love python but I'm not convinced that a language with significant whitespace is ideal for the web where formatting is too easily lost.
Re:Brython, Python in the browser by lambda on Tuesday January 29, 2013 @10:39AM (#5134530)
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.
Re:Brython, Python in the browser by Scriptor on Tuesday January 29, 2013 @10:52AM (#5134601)
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.
Re:Brython, Python in the browser by cookiecaper on Tuesday January 29, 2013 @06:16PM (#5137050)
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.