Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

    ->(f){f.(3)}.(->(x){x+2})
vs

    (lambda f: f(3))(lambda x: x+2)
the first one(ruby) requires me to press the shift key 6 times, the python version only 2, but on the other hand i have to write "lambda" twice. I say they are even :)


Except the Ruby version won't run away and cry if you try to do anything even slightly more complex in it. Also you can still type "lambda" if you really want to.


ok, how about this one:

    ((lambda (f) (f 3))(lambda (x) (+ x 2)))


All the visual appeal of oatmeal with fingernail clippings mixed in.

Actually, I do prefer ASCII for anything that isn't already a convention in math -- parens to group expressions, curly braces for sets, etc.


Haven't read the article yet but I find the python version much more readable.


Unfortunately, the python one is much less functional. Complain to your local python guru about the lack of real lambdas, today!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: