Hacker News new | ask | show | jobs
by indubitably 3188 days ago
I don't understand why Python people aren't more intent on getting it into web browsers. Or are they?
2 comments

What would I want to do with Python in a web browser? I wouldn't be able to use most of the standard library, and I wouldn't be able to use most PyPi packages.

Sure, it might be a better language than JavaScript, but you would have to rip out and replace the entire standard library, and Python without its libraries wouldn't be any fun.

Oh we wish. People tried (brython came close). But any attempt are currently not practical as the runtime is very heavy, not to mention the stdlib.

So we are stuck unless the browser vendors decide to ship a Python VM next to their JS VM. And they won't do that.

ClojureScript does very well despite the parent Clojure having a big runtime and largish stdlib. Good tree shaking (dead code elimination) helps a lot.
Specifically, tree shaking through the venarable (and somewhat confusingly named :) Google Closure Compiler.