Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #105908

Re: List of Functions

Path csiph.com!feeder.erje.net!2.eu.feeder.erje.net!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
From Marko Rauhamaa <marko@pacujo.net>
Newsgroups comp.lang.python
Subject Re: List of Functions
Date Mon, 28 Mar 2016 11:58:54 +0300
Organization A noiseless patient Spider
Lines 42
Message-ID <87mvpjx9kh.fsf@elektro.pacujo.net> (permalink)
References <3c44f0f8-d701-463e-bf2c-f5871c51bddf@googlegroups.com> <87bn5z1mkd.fsf@bsb.me.uk> <lf5d1qf2g7v.fsf@ling.helsinki.fi>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 8bit
Injection-Info mx02.eternal-september.org; posting-host="b7cb1518d23ec19d482dcc9c31d30fdd"; logging-data="20532"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/nq0EU4h2bdmmii40ylkkl"
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
Cancel-Lock sha1:+O6SqoPS+FzRp8F/LwG2X7p1i4Y= sha1:WZ9VfkVzoLJTrnncCxhgK0le/cU=
Xref csiph.com comp.lang.python:105908

Show key headers only | View raw


Jussi Piitulainen <jussi.piitulainen@helsinki.fi>:

> Ben Bacarisse writes:
>> It's shame that anonymous functions (for that's what's being returned
>> here -- a function with no name) were born of a subject that used
>> arbitrary Greek letters for things. We seem stuck with the mysterious
>> but meaningless "lambda" for a very simple and useful idea.
>
> Well said.
>
> Python should have called it "fun".
>
> I have heard that the use of lambda for this purpose was originally
> not an arbitrary choice but a typographical accident. A misinterpreted
> caret or something. I also seem to remember that I've seen some
> discussion on whether the story is true or not, but I forget which way
> it went.

I don't know the etymology of things, but way back when I learned
combinatory logic, the capital letter Λ was used as the name of the
abstraction algorithm.

Combinatory logic was able to express any formula without variables,
which apparently were somewhat of a sore spot for logicians in the early
20th century. So you took your formula with variables and ran it through
the Λ algorithm to get an equivalent combinator expression that didn't
have any variables.

I always thought the λ calculus arose from the abstraction algorithm.
Once the logicians had "tamed" variables with Λ, they no longer felt the
need to avoid them. You could set aside the clumsy combinators and
incorporate the lambda in the language itself.

...

As for Python, I don't feel a great need for anonymous functions.
However, I keep running into a need for anonymous classes, or, rather,
classless objects. Not a biggie. I just create a one-off inner class and
instantiate it, but I do appreciate Java's syntactic innovation.


Marko

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

List of Functions Richard Riehle <rriehle@itu.edu> - 2016-03-27 12:38 -0700
  Re: List of Functions Erik <python@lucidity.plus.com> - 2016-03-28 00:10 +0100
  Re: List of Functions Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-03-28 01:19 +0100
    Re: List of Functions Jussi Piitulainen <jussi.piitulainen@helsinki.fi> - 2016-03-28 10:51 +0300
      Re: List of Functions Marko Rauhamaa <marko@pacujo.net> - 2016-03-28 11:58 +0300
        Re: List of Functions Dan Sommers <dan@tombstonezero.net> - 2016-03-28 12:39 +0000
          Re: List of Functions Marko Rauhamaa <marko@pacujo.net> - 2016-03-28 16:40 +0300
            Re: List of Functions Chris Angelico <rosuav@gmail.com> - 2016-03-29 08:40 +1100
              Re: List of Functions Steven D'Aprano <steve@pearwood.info> - 2016-03-29 09:52 +1100
                Re: List of Functions Chris Angelico <rosuav@gmail.com> - 2016-03-29 10:40 +1100
                Re: List of Functions Marko Rauhamaa <marko@pacujo.net> - 2016-03-29 07:49 +0300
              Re: List of Functions Marko Rauhamaa <marko@pacujo.net> - 2016-03-29 07:45 +0300
                Re: List of Functions Chris Angelico <rosuav@gmail.com> - 2016-03-29 16:00 +1100
      Re: List of Functions Steven D'Aprano <steve@pearwood.info> - 2016-03-29 10:40 +1100
        Re: List of Functions Random832 <random832@fastmail.com> - 2016-03-28 19:50 -0400
        Re: List of Functions Chris Angelico <rosuav@gmail.com> - 2016-03-29 10:54 +1100
        Re: List of Functions Rustom Mody <rustompmody@gmail.com> - 2016-03-28 19:23 -0700
        Re: List of Functions Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-03-29 03:45 +0100
          Re: List of Functions Chris Angelico <rosuav@gmail.com> - 2016-03-29 14:33 +1100
          Re: List of Functions Rustom Mody <rustompmody@gmail.com> - 2016-03-28 23:21 -0700
            Re: List of Functions Marko Rauhamaa <marko@pacujo.net> - 2016-03-29 09:50 +0300
            Re: List of Functions Christian Gollwitzer <auriocus@gmx.de> - 2016-03-29 08:52 +0200

csiph-web