5 ms·
My only issue with Python being used for client-side web programing is that significant newlines/whitespace would be an incredible pain if you're inling things
by thomasfoster96 11y ago
My only issue with Python being used for client-side web programing is that significant newlines/whitespace would be an incredible pain if you're inling things in HTML. Although you would pretty much be forced to use GZip rather than just minification, which is good-ish.
Plus, loading a 900KB file to run the Python client-side is probably a terrible idea when you could either transpile to JS or asm.js or (in the future) WebAssembly.
- stuaxo 11y agoIt probably could be minified using ;
- thomasfoster96 11y agoWhich part? A new line is the same amount of data as a semi-colon.
- wlof 11y agoYes, but you can cut out some of the indentation whitespace using semicolons.
- zo1 11y agoItems that are on the same "level" of indentation, I.e. in a codeblock can have all of them prepended with the whitespace, and then separated with semi-colons. def func(param): for i in xrange(5): print("Inner");print("AnotherLine");print("YetAnotherLine") From the example you see that whitespace is still necessary, but you could "group" items and not have to repeat the whitespace that forms their level of indentation.
- mozgi 11y agoWon't work for try/except block.