Re: Choosing a new language



Daniel Gee wrote:
And Ruby now beats Python by 25% on googlefight. That ain't just Rails,
that has to be Rails first, then, wow, anonymous functions are frickin
cool, meanwhile GvR almost removed from Python the lame ones he did support.

Why do you really need anonymous functions in python when you can
already declare functions inside of other functions?

....because without anonymous functions, you're forced to come up with a name even if there is no good name for what you want to express.

No language feature is 'necessary'. It's all about convenience.


Pascal

--
My website: http://p-cos.net
Common Lisp Document Repository: http://cdr.eurolisp.org
Closer to MOP & ContextL: http://common-lisp.net/project/closer/
.



Relevant Pages

  • Re: Securing a future for anonymous functions in Python
    ... > John Roth wrote: ... Languages that are designed with anonymous functions ... Python isn't designed that way, ... Have you ever programmed in a language that does use ...
    (comp.lang.python)
  • Re: lambda functions ?
    ... I'm new on this list and in python. ... FWIW, lambda is just a syntactic sugar for creating anonymous, dead-simple functions, usually used as callbacks for generic functions or methods like map, filter, list.sort etc. ... FWIW, this programming style (anonymous functions, closures etc) comes from functional programming. ...
    (comp.lang.python)
  • Re: Express What, not How.
    ... def if_true: return fn ... Python already has an 'if' statement. ... I think I can make an even stronger case for anonymous functions ... which is littered with lambda expressions such as 'lambda: ...
    (comp.lang.python)
  • Re: Choosing a new language
    ... meanwhile GvR almost removed from Python the lame ones he did support. ... Why do you really need anonymous functions in python when you can ...
    (comp.lang.lisp)