Strange use of Lambda arrow

Cameron Simpson cs at cskk.id.au
Sat Jun 6 00:35:30 EDT 2020


On 06Jun2020 02:48, MRAB <python at mrabarnett.plus.com> wrote:
>On 2020-06-06 01:01, Chris Angelico wrote:
>>On Sat, Jun 6, 2020 at 8:24 AM Cameron Simpson <cs at cskk.id.au> wrote:
>>>The OP may be being confused by JavaScript, where they have "arrow
>>>functions", which are what Python calls lambda: anonymous functions. It
>>>uses an arrow in the syntax:
>>>
>>>    (x,y) -> x+y
>>>
>>
>>In JS, they're sometimes called "fat arrow" functions, because they
>>are spelled "=>". Maybe there's some other language where they're
>>spelled "->"?
>>
>I think it's Cameron who's confused. :-)

Likely. It is months since I wrote any JavaScript, and I've never 
enjoyed it. It is a hellscape of callbacks and closures, and an object 
model as thin as Perl's.

>The OP said "Java". Java has "->"; JavaScript has "=>".

Hah. Are there not languages where "=>" is an alternate spelling of 
greater-than-or-equal?

Cheers,
Cameron Simpson <cs at cskk.id.au>


More information about the Python-list mailing list