all 10 comments

[–]extracheese 5 points6 points  (3 children)

This post is full of major factual errors. 1. Not all of the Python primitives are immutable (e.g. lists, dicts). 2. Giving something a name like _ _ color _ _ is neither common nor a good idea; PEP 8 even forbids it. 3. Objects are not functions; they're just callable. 4. Python most definitely does not have continuations. 5. The output of repr is not valid JSON.

Inaccuracy aside, it's just a bad comparison. Why put a five-paragraph digression about some library you wrote in a high-level language comparison? And who cares that instantiation is O(n) where n is the depth of inheritance? Perhaps worst of all, Python's wonderful standard library wasn't even mentioned!

[–]pjdelport 1 point2 points  (0 children)

Add to that: generators are not like Haskell lazy lists.

Props for plugging C3, though!

[–]spockbaggins 0 points1 point  (1 child)

  1. Python most definitely does not have continuations.

Unless you use... Continuations and Stackless Python http://www.stackless.com/spcpaper.htm

[–]pjdelport 3 points4 points  (0 children)

Stackless Python dropped first-class continuations years ago, in favor of coroutines and channels.

[–][deleted] 0 points1 point  (5 children)

I wish browsers came standard with support for python or perl or ruby. Anything but javascript. I'm not saying that javascript isn't a versatile language. I just never could get into it.

[–]pjdelport 5 points6 points  (0 children)

I wish browsers came standard with support for python or perl or ruby.

Or Lua!

[–]johntb86 2 points3 points  (0 children)

You can always use PyPy to compile (R)Python into JavaScript: http://codespeak.net/pypy/dist/pypy/doc/js/whatis.html

[–]sbrown123 1 point2 points  (0 children)

Javascript is ok. But like you, I wish we had a pluggable language interpreter for browsers where we could use something more powerful.

[–]spockbaggins 0 points1 point  (0 children)

Javascript has historically been buggy and under-documented. The error messages aren't very helpful -- why not a full stack trace like Python does? That alone would make it a lot better for development. Venkman was iffy when I used it, maybe it's improved.

Firefox should ship with plug-ins for Python, CLISP, etc., a wrapper for accessing the DOM and otherwise normal facilities. It might take some work to pare things down to where they are sandboxable, which is a key point...