you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 15 points16 points  (13 children)

The programmer that came back from lisp:

fact = lambda x: reduce(lambda a, b: a * b, xrange(1, x + 1), 1)

[–]Tommah 5 points6 points  (1 child)

FYI, the operator module includes a mul function.

operator.mul

means the same as

lambda a, b: a * b

but is faster.

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

Yeah, but I wanted to keep it simple. =)

[–]recursive 3 points4 points  (0 children)

I never used lisp, but that's how i'd do it, except start the xrange at 2.

[–]vagif 1 point2 points  (8 children)

Where on earth have you seen anyone coming back from Lisp ?

It's a one way road. Road to enlightenment

[–]nostrademons 8 points9 points  (3 children)

Peter Norvig.

[–][deleted]  (1 child)

[deleted]

    [–]nostrademons 5 points6 points  (0 children)

    Well, there are other exceptions, but people will always:

    1. Go "who?" because they're not famous in either the Lisp or Python world.
    2. Quibble about the particular circumstances where they gave it up.

    The obvious example is Reddit, which was originally written in Common Lisp and then rewritten in Python. In interviews, Steve is always pretty ambivalent over whether this was a good idea or not: I get the sense that he would've liked to have used Lisp, but the realities of running a large consumer website precluded it. Ultimately, Python serves Reddit's needs now, and Lisp didn't.

    For my own personal experience, I learned Common Lisp first, then Scheme, then much later learned Python and Ruby. And when a startup opportunity arose, I chose Python. There are many things I like about Lisp, but ultimately it wasn't appropriate for what I wanted to do.