7 ms·
Python needs to be natively supported as a scripting lang in browsers. Google, MS, Firefox - make it so!
by ct 14y ago
Python needs to be natively supported as a scripting lang in browsers. Google, MS, Firefox - make it so!
- trothamel 14y agoAs much as I like Python, I don't think this is the right approach. What browsers need to do is to have a machine-level bytecode, so that they can download whatever interpreters are needed to run the scripting code the page uses. Then pages can be written in whatever language the developer feels is best. This is the real potential of something like Native Client - although it doesn't look like that potential will be achieved any time soon.
- Niten 14y agoAs much as I don't like Microsoft, I actually think the .NET CLR would be an excellent choice for such a runtime. NaCl not so much; target architecture-dependent compiled code is a major downside.
- tlrobinson 14y agoThere's PNaCl: http://www.chromium.org/nativeclient/pnacl/building-and-testing-portable-native-client http://www.chromium.org/nativeclient/pnacl/building-and-test...
- greggman 14y agoWhat about pnacl? http://www.chromium.org/nativeclient/pnacl/building-and-testing-portable-native-client http://www.chromium.org/nativeclient/pnacl/building-and-test...
- Niten 14y agoI had no idea about that, thanks
- cbhl 14y agoPages downloading and executing things just reminds me of ActiveX from the late 90s. I think South Korea still relies on the technology for their home-grown version of SSL.
- trothamel 14y agoPages download and execute things all the time. The problems with ActiveX was that it was tied to the Windows API, and that it wasn't sandbox - it wasn't the idea of downloading code.
- pcwalton 14y agoThere's no such thing as a language-agnostic bytecode. A bytecode is just a compressed source encoding of some language.
- thisishugo 14y agoI take it you never heard of the JVM, or Microsoft's CLR.
- slurgfest 14y agoI don't think that it's the right approach only ever to allow JavaScript (just because every time anything else is mentioned, we inevitably go off on this tangent). There is no indication that browsers are going to standardize on a VM (let alone NaCl) any time soon. If someone just stopped bikeshedding and did Python in the browser, there's no reason a machine-level bytecode or whatever couldn't be implemented later.
- ufo 14y agoPython is a really big and complicated language to include in Browsers. And think of the version hell: If you think Pyhthon 3 compatibility is apain, imagine if we still had to use Python 2.2 on Firefox or something like that.
- slurgfest 14y agoThese arguments are terribly heuristic. The full stack of software included in any significant JavaScript app is big and complicated. There are already runtime differences, and we aren't saying that those make JS unusable. There is not going to be a big 3->4 migration any time remotely soon. No 'version hell'. The current story for Python compatibility is certainly much worse!
- ufo 14y ago> The full stack of software included in any significant JavaScript app is big and complicated. But those are libraries under your control at least. The "problem" with Python is that the language itself is big. Normally this is a non-issue, since you can upgrade your interpreter version when your code stack supports it but on the web you don't get that luxury because you are forced to use whatever interpreter the users have.