Why is Python popular, while Lisp and Scheme aren't?

Neil Schemenauer nas at python.ca
Mon Nov 11 17:12:50 EST 2002


Jacek Generowicz wrote:
> I beg to differ.
> 
> You *can* use Lisp as a Python-with-s-expressions. Once you get over
> the parentheses (let's not argue whether one can get over them or
> not), it really is very simple, if you stick to the simple things.

Show me the Lisp code that corresponds to the Python code:

    float(somestring)

'read' does't count since the string could have come from an evil
outside source.  How do I write

    def escape(s):
        s = s.replace("&", "&")
        s = s.replace("<", "<")
        s = s.replace(">", ">")
        s = s.replace('"', """)
        return s

plainly and efficiently in Lisp?  How about:

    import socket
    s = socket.socket()
    s.connect(("localhost", 13))
    print s.recv(1024)
    s.close()
    
Anything is possible but that doesn't mean it's convenient.

  Neil




More information about the Python-list mailing list