Sunday, March 30, 2014

Java 8 Launch

Continue the Conversation

Use #Java8 or go to the Java 8 Forum

JavaOne 2014

Need more information on Java 8? Don’t miss JavaOne 2014 San Francisco. Register Now.

Java SE 8

Java SE 8—Language and Library Features

Java SE 8—Language and Library Features

Brian Goetz

A New Date and Time API—JSR-310

A New Date and Time API—JSR-310

Stephen Colebourne

JDK Hacker on Core Libraries

JDK Hacker on Core Libraries

Paul Sandoz

Introduction to Lambda Expressions

Introduction to Lambda Expressions

Stuart Marks

Enhanced Metadata—Annotations and Access to Parameter Names

Enhanced Metadata—Annotations and Access to Parameter Names

Alex Buckley and Michael Ernst

Performance Improvements in JDK 8

Performance Improvements in JDK 8

Staffan Friberg

What's New for JavaFX in Java SE 8

What's New for JavaFX in Java SE 8

Jim Weaver

New Features in Java SE 8: A Developer's Guide

New Features in Java SE 8: A Developer's Guide

Simon Ritter

NetBeans IDE 8: Toolbox for Java SE 8

NetBeans IDE 8: Toolbox for Java SE 8

Geertjan Wielenga

Nashorn: JavaScript on the JVM

Nashorn: JavaScript on the JVM

Jim Laskey

Java 8 Security Highlights

Java 8 Security Highlights

Milton Smith

Introducing Java Mission Control 5.3.0

Introducing Java Mission Control 5.3.0

Marcus Hirt


Java SE Embedded 8

Java 8 on the Raspberry Pi

Java 8 on the Raspberry Pi

Stephen Chin

Getting Started with Java SE Embedded on Lego Mindstorms EV3

Getting Started with Java SE Embedded on Lego Mindstorms EV3

Hinkmond Wong

Migrating from CDC 1.1.x to Java SE Embedded 8

Migrating from CDC 1.1.x to Java SE Embedded 8

Hinkmond Wong

Developing Embedded Applications with Java SE 8 Compact Profiles

Developing Embedded Applications with Java SE 8 Compact Profiles

Bob Vandette

Getting Started with JavaFX Embedded on a Raspberry Pi

Getting Started with JavaFX Embedded on a Raspberry Pi

Lisa Selle

Reducing Dynamic Memory in Java SE Embedded Application

Reducing Dynamic Memory in Java SE Embedded Application

Darryl Mocek

Choosing a Compact Profile for your Deployment

Choosing a Compact Profile for your Deployment

Jim Connors

Real-time Analytics: SE Embedded 8 and OEP on Freescale i.MX6

Real-time Analytics: SE Embedded 8 and OEP on Freescale i.MX6

Jeff Kudrick


Java ME 8

Be an Embedded Developer in Minutes Using Java ME Embedded 8

Be an Embedded Developer in Minutes Using Java ME Embedded 8

Angela Caicedo

JSR 360—CLDC 8: Benefits of an Optimized Implementation

JSR 360—CLDC 8: Benefits of an Optimized Implementation

Oleg Pliss

JSR 360—CLDC 8: Java Platform for IoT

JSR 360—CLDC 8: Java Platform for IoT

Michael Lagally

JSR 360—CLDC 8: Generic Networking APIs

JSR 360—CLDC 8: Generic Networking APIs

Roger Riggs

Unified Development Experience for Java ME 8 and Java SE Embedded 8

Unified Development Experience for Java ME 8 and Java SE Embedded 8

Shiva Govindarajapuram

Accessing HW Devices Using Java ME 8 Device I/O API

Accessing HW Devices Using Java ME 8 Device I/O API

Thierry Violleau and Jens P├Ątzold

Java ME 8: Top 10 Features

Java ME 8: Top 10 Features

Terrence Barr

Java ME 8: Tackling the Challenges of Embedded Software Design

Java ME 8: Tackling the Challenges of Embedded Software Design

Terrence Barr

MEEP—A New Java Profile for the Embedded World

MEEP—A New Java Profile for the Embedded World

Volker Bauche and Andrey Petushkov

Developing Modular, Service-enabled Applications: Java ME 8

Developing Modular, Service-enabled Applications: Java ME 8

Leonardo Lima


Internet of Things and The Enterprise

Here comes Java 8. Learn how your applications will benefit.

Here comes Java 8. Learn how your applications will benefit.

Georges Saab, VP Java Development, Oracle interviewed by Tori Wieldt, OTN and Java Community Manager, Oracle

Here comes Java 8. Learn how your edge devices will benefit.

Here comes Java 8. Learn how your edge devices will benefit.

Robert Clark, Senior Director Java Development, Oracle interviewed by Urszula Grassl, IoT Product Management, Oracle

Turning devices into value-generating app platform with Java

Turning devices into value-generating app platform with Java

Axel Hansmann, VP Strategy and Marketig Communication M2M , Gemalto interviewed by Robert Clark, Senior Director Java Development, Oracle

Building Blocks for the Internet of Things

Building Blocks for the Internet of Things

Nandini Ramani, VP Java Development, Oracle interviewed by Nicolas Lorain, IoT Product Management, Oracle

Distributed Intelligence in IoT Deployments

Distributed Intelligence in IoT Deployments

Demed L'Her, VP Product Management , Oracle interviewed by Jai Suri, Director Product Management, Oracle

For a person without a comp-sci background, what is a lambda in the world of Computer Science?
share|edit
add comment

16 Answers

up vote301down voteaccepted
Lambda comes from the Lambda Calculus and refers to anonymous functions in programming.
Why is this cool? It allows you to write quick throw away functions without naming them. It also provides a nice way to write closures. With that power you can do things like this.
Python
def adder(x):
    return lambda y: x + y
add5 = adder(5)
add5(1)
6
JavaScript
var adder = function (x) {
    return function (y) {
        return x + y;
    };
};
add5 = adder(5);
add5(1) == 6
Scheme
(define adder
    (lambda (x)
        (lambda (y)
           (+ x y))))
(define add5
    (adder 5))
(add5 1)
6
Func> adder = 
    (int x) => (int y) => x + y; // `int` declarations optional
Func add5 = adder(5);
var add6 = adder(6); // Using implicit typing
Debug.Assert(add5(1) == 6);
Debug.Assert(add6(-1) == 5);

// Closure example
int yEnclosed = 1;
Func addWithClosure = 
    (x) => x + yEnclosed;
Debug.Assert(addWithClosure(2) == 3);
As you can see from the snippet of Python and JavaScript, the function adder takes in an argument x, and returns an anonymous function, or lambda, that takes another argument y. That anonymous function allows you to create functions from functions. This is a simple example, but it should convey the power lambdas and closures have.
share|edit
22 
This is by by far the best yet simplest description of lambda I have ever seen. Yet you managed to not lose any of the key ideas bravo. +1 –  faceless1_14 Aug 10 '09 at 13:36
   
Agreed. I have seen the light! Thanks. =) –  Chris Cooper Apr 14 '10 at 23:53
   
+1 Best explanation I've seen. Thanks –  Rich Jul 20 '10 at 11:05
   
awesome, thanks much –  Orbit Oct 29 '10 at 13:38
3 
What a superb explanation!! I have the power now. –  trusktr Feb 15 '11 at 3:50
show 1 more comment