6 ms·
Why-didnt-we-use-python-in-the-browser
- jeffehobbs 15y agoI don't see why we couldn't, at some point down the line.
- Hovertruck 15y agoI'd hate to see how IE would've butchered that.
- smoyer 15y agoI'm not sure I agree with the premise of the article ... Part of Python's attraction is it's vast ecosystem of libraries and many of them wouldn't work in a browser. How many of those command-line applications would actually work? If you're looking for a clean syntax, try Coffescript, limit yourself to javascript's "good parts" and be very careful with your style.
- gcp 15y agoSomeone should make a FAQ for this. It comes up every 2 months. One important point I remember is that it would have been Python without the standard library. Which isn't anything special, really. We call it CoffeeScript nowadays.
- gioele 15y agoJavascript without its standard library (string manipulation, alert(), DOM functions) would not be all that useful as well.
- gcp 15y agoThe Javascript standard library is tiny compared to the one of Python. This is very relevant when people say they prefer Python. They don't use Python with the Javascript standard library.
- willvarfar 15y ago(Blog author) It was very much the core language and most central of modules that I meant; I've blogged on this before to explain my position http://williamedwardscoder.tumblr.com/post/18319031919/programming-language-readability http://williamedwardscoder.tumblr.com/post/18319031919/progr...
- gioele 15y agoFrom http://www.w3.org/TR/html4/interact/scripts.html http://www.w3.org/TR/html4/interact/scripts.html <INPUT name="edit1" size="50"> <SCRIPT type="text/tcl"> proc edit1_changed {} { if {[edit value] == abc} { button1 enable 1 } else { button1 enable 0 } } edit1 onChange edit1_changed </SCRIPT> We could have had a future where you could choose which language to use in client-side code. The "removal" of @type from HTML 5 strongly suggests that not everybody believes in that future. Maybe initiatives like Dart and NaCL will create an humus that will make the use of other languages acceptable in HTML pages.
- rsanchez1 15y agoImagine if it had been Perl instead? Well, there was an attempt to get PerlScript to run in the browser, but the hoops you had to go through to get it made it unattractive compared with JS that got native browser support.
- willvarfar 15y agoSad this got flagged
- firlefans 15y agoCheck out Skulpt and Pyjamas. Wouldn't recommend either for production use but Coffeescript gets you a similar, even cleaner syntax and there is a js lib for everything these days.