TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Why-didnt-we-use-python-in-the-browser

9 pointsby kracekumarabout 13 years ago

8 comments

smoyerabout 13 years ago
I'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?<p>If you're looking for a clean syntax, try Coffescript, limit yourself to javascript's "good parts" and be very careful with your style.
gioeleabout 13 years ago
From <a href="http://www.w3.org/TR/html4/interact/scripts.html" rel="nofollow">http://www.w3.org/TR/html4/interact/scripts.html</a><p><pre><code> &#60;INPUT name="edit1" size="50"&#62; &#60;SCRIPT type="text/tcl"&#62; proc edit1_changed {} { if {[edit value] == abc} { button1 enable 1 } else { button1 enable 0 } } edit1 onChange edit1_changed &#60;/SCRIPT&#62; </code></pre> 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.<p>Maybe initiatives like Dart and NaCL will create an humus that will make the use of other languages acceptable in HTML pages.
firlefansabout 13 years ago
Check 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.
jeffehobbsabout 13 years ago
I don't see why we couldn't, at some point down the line.
Hovertruckabout 13 years ago
I'd hate to see how IE would've butchered that.
gcpabout 13 years ago
Someone should make a FAQ for this. It comes up every 2 months.<p>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.
评论 #3816842 未加载
willvarfarabout 13 years ago
Sad this got flagged
rsanchez1about 13 years ago
Imagine if it had been Perl instead?<p>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.