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


Groups > comp.lang.java.programmer > #9956

Re: Java 8 Lambda binary snapshot

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!nx01.iad01.newshosting.com!newshosting.com!69.16.185.11.MISMATCH!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
From Lew <lewbloch@gmail.com>
Newsgroups comp.lang.java.programmer
Subject Re: Java 8 Lambda binary snapshot
Date Mon, 14 Nov 2011 06:51:56 -0800 (PST)
Organization http://groups.google.com
Lines 48
Message-ID <11933108.94.1321282316164.JavaMail.geo-discussion-forums@prmf13> (permalink)
References <j9k23f$u03$1@dont-email.me> <2244638.2045.1321057203472.JavaMail.geo-discussion-forums@prep8> <0kuvb71v0ie3qtupn8d04q27fer5s0l49u@4ax.com> <4ec000d8$0$293$14726298@news.sunsite.dk> <j9r744$4oq$1@speranza.aioe.org>
Reply-To comp.lang.java.programmer@googlegroups.com
NNTP-Posting-Host 173.164.137.214
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
X-Trace posting.google.com 1321282438 19455 127.0.0.1 (14 Nov 2011 14:53:58 GMT)
X-Complaints-To groups-abuse@google.com
NNTP-Posting-Date Mon, 14 Nov 2011 14:53:58 +0000 (UTC)
In-Reply-To <j9r744$4oq$1@speranza.aioe.org>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=173.164.137.214; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T
User-Agent G2/1.0
X-Google-Web-Client true
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:9956

Show key headers only | View raw


 Nasser M. Abbasi wrote:
> ps. I just heard about this Lambda thing ;)

"This Lambda [sic] thing" has been around longer than the Java language.

> This looks like the ability to have, what is called in Mathematica,
> or may be other functional languages, a pure function, that one
> can define and use on the fly ?
> 
> For example, in Mathematica, one can write
> 
> "Sort[list,p]
> sorts using the ordering function p. "
> 
> and is coded like this, for example:
> 
> In[11]:= Sort[{4,1,3,2,2},#1>#2&]
> Out[11]= {4,3,2,2,1}
> 
> where the '&' indicates the end of the function, and
> #1 means first argument, and #2 mean the second argument.

This has existed in Java since about version 1.1, only the syntax is rather more verbose.

They don't call it "pure function" in Java; there is no such thing.  It's called "implementation of a callback interface" in Java.

The "lambda" feature of Java 8 is a syntactic sweetener of the interface-implementation idiom, not the addition of "pure" (whatever that means) functions.

> One can also write the pure function more explicit, like this:
> 
> In[8]:= Sort[{4,1,3,2,2},Function[{x,y},x<y]]
> Out[8]= {1,2,2,3,4}
> 
> Is this, somewhat,  close to what Lambda in Java allows?

Why not read the literature, cited at the top of this thread?  That question was answered from the very start of this conversation.  Of course, it does require that you actually click to and read the information.

OTOH, documentation is a wonderful thing, and the habit of studying it a most empowering one.

Try it, why don't you?

> It is very useful feature to be able to do this sort of thing.
> (I need to read more about Java 8, sounds interesting)

Yes - yes you do.

-- 
Lew

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


Thread

Java 8 Lambda binary snapshot markspace <-@.> - 2011-11-11 12:55 -0800
  Re: Java 8 Lambda binary snapshot Lew <lewbloch@gmail.com> - 2011-11-11 16:20 -0800
    Re: Java 8 Lambda binary snapshot markspace <-@.> - 2011-11-11 16:38 -0800
      Re: Java 8 Lambda binary snapshot Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-11-12 06:36 -0400
        Re: Java 8 Lambda binary snapshot Arne Vajhøj <arne@vajhoej.dk> - 2011-11-12 09:19 -0500
          Re: Java 8 Lambda binary snapshot Lew <lewbloch@gmail.com> - 2011-11-12 10:07 -0800
            Re: Java 8 Lambda binary snapshot Arne Vajhøj <arne@vajhoej.dk> - 2011-11-12 17:09 -0500
            Re: Java 8 Lambda binary snapshot Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-11-14 06:25 -0400
              Re: Java 8 Lambda binary snapshot Lew <lewbloch@gmail.com> - 2011-11-14 06:45 -0800
                Re: Java 8 Lambda binary snapshot Robert Klemme <shortcutter@googlemail.com> - 2011-11-14 23:28 +0100
                Re: Java 8 Lambda binary snapshot Arne Vajhøj <arne@vajhoej.dk> - 2011-11-15 20:34 -0500
                Re: Java 8 Lambda binary snapshot Lew <lewbloch@gmail.com> - 2011-11-15 22:28 -0800
                Re: Java 8 Lambda binary snapshot BGB <cr88192@hotmail.com> - 2011-11-16 07:43 -0700
                Re: Java 8 Lambda binary snapshot kensi <kensi_kensington@zoonoses.de> - 2011-11-16 12:53 -0500
                Re: Java 8 Lambda binary snapshot "Nasser M. Abbasi" <nma@12000.org> - 2011-11-16 12:20 -0600
                Re: Java 8 Lambda binary snapshot BGB <cr88192@hotmail.com> - 2011-11-16 14:27 -0700
                Re: Java 8 Lambda binary snapshot Lew <lewbloch@gmail.com> - 2011-11-16 14:04 -0800
                Re: Java 8 Lambda binary snapshot BGB <cr88192@hotmail.com> - 2011-11-17 10:05 -0700
                Re: Java 8 Lambda binary snapshot Arne Vajhøj <arne@vajhoej.dk> - 2011-11-16 18:57 -0500
        Re: Java 8 Lambda binary snapshot Arne Vajhøj <arne@vajhoej.dk> - 2011-11-12 09:23 -0500
    Re: Java 8 Lambda binary snapshot Roedy Green <see_website@mindprod.com.invalid> - 2011-11-13 09:12 -0800
      Re: Java 8 Lambda binary snapshot Arne Vajhøj <arne@vajhoej.dk> - 2011-11-13 12:39 -0500
        Re: Java 8 Lambda binary snapshot Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-13 20:13 +0000
          Re: Java 8 Lambda binary snapshot Arne Vajhøj <arne@vajhoej.dk> - 2011-11-13 15:43 -0500
            Re: Java 8 Lambda binary snapshot Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-11-13 21:06 +0000
              Re: Java 8 Lambda binary snapshot Arne Vajhøj <arne@vajhoej.dk> - 2011-11-13 16:16 -0500
        Re: Java 8 Lambda binary snapshot "Nasser M. Abbasi" <nma@12000.org> - 2011-11-14 08:03 -0600
          Re: Java 8 Lambda binary snapshot Lew <lewbloch@gmail.com> - 2011-11-14 06:51 -0800
  Re: Java 8 Lambda binary snapshot Roedy Green <see_website@mindprod.com.invalid> - 2011-11-12 04:53 -0800
  Re: Java 8 Lambda binary snapshot markspace <-@.> - 2011-11-12 14:02 -0800
    Re: Java 8 Lambda binary snapshot Arne Vajhøj <arne@vajhoej.dk> - 2011-11-12 17:09 -0500
      Re: Java 8 Lambda binary snapshot markspace <-@.> - 2011-11-12 19:14 -0800
        Re: Java 8 Lambda binary snapshot BGB <cr88192@hotmail.com> - 2011-11-12 20:56 -0700
        Re: Java 8 Lambda binary snapshot Lew <lewbloch@gmail.com> - 2011-11-13 05:08 -0800
        Re: Java 8 Lambda binary snapshot Arne Vajhøj <arne@vajhoej.dk> - 2011-11-13 10:08 -0500
          Re: Java 8 Lambda binary snapshot markspace <-@.> - 2011-11-13 08:08 -0800
            Re: Java 8 Lambda binary snapshot Arne Vajhøj <arne@vajhoej.dk> - 2011-11-13 12:23 -0500
        Re: Java 8 Lambda binary snapshot Roedy Green <see_website@mindprod.com.invalid> - 2011-11-13 09:23 -0800
          Re: Java 8 Lambda binary snapshot Arne Vajhøj <arne@vajhoej.dk> - 2011-11-13 12:27 -0500
          Re: Java 8 Lambda binary snapshot Lew <lewbloch@gmail.com> - 2011-11-13 11:08 -0800

csiph-web