

Why-didnt-we-use-python-in-the-browser - kracekumar
http://williamedwardscoder.tumblr.com/post/20771096806/why-didnt-we-use-python-in-the-browser

======
smoyer
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?

If you're looking for a clean syntax, try Coffescript, limit yourself to
javascript's "good parts" and be very careful with your style.

------
gioele
From <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.

------
firlefans
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.

------
jeffehobbs
I don't see why we couldn't, at some point down the line.

------
Hovertruck
I'd hate to see how IE would've butchered that.

------
gcp
Someone 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
Javascript without its standard library (string manipulation, alert(), DOM
functions) would not be all that useful as well.

~~~
gcp
The 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
(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/progr...](http://williamedwardscoder.tumblr.com/post/18319031919/programming-
language-readability)

------
willvarfar
Sad this got flagged

------
rsanchez1
Imagine 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.

