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


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

Re: are lambdas a way to bring functional programming to java?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From markspace <markspace@nospam.nospam>
Newsgroups comp.lang.java.programmer
Subject Re: are lambdas a way to bring functional programming to java?
Date Tue, 22 Jul 2014 10:39:11 -0700
Organization A noiseless patient Spider
Lines 47
Message-ID <lqm7k4$cj3$1@dont-email.me> (permalink)
References <ead6a498-272d-4ddd-b509-031bb858e882@googlegroups.com> <hpbujmlvfktw$.gwo2lpti2hsy.dlg@40tude.net> <ch13r992v98u5tqu88i2banltkpsgvhjkr@4ax.com> <MPG.2e1d0dba27ee4d221@202.177.16.121> <MPG.2e1d2056334506bc22@202.177.16.121> <lov3h3$thm$1@news.albasani.net> <lov868$rb$1@dont-email.me> <lqllu1$8fp$1@news.albasani.net>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Tue, 22 Jul 2014 17:39:16 +0000 (UTC)
Injection-Info mx05.eternal-september.org; posting-host="9358cda03e1e0dfd3c4b757daa608707"; logging-data="12899"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18V3oOYwdM3GeQRyfY5t3rryx2CRV9cxh4="
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0
In-Reply-To <lqllu1$8fp$1@news.albasani.net>
Cancel-Lock sha1:FBGvEsrG1DadoYBqxFIWOVN0kPQ=
Xref csiph.com comp.lang.java.programmer:29199

Show key headers only | View raw


On 7/22/2014 5:37 AM, Jan Burse wrote:
> markspace schrieb:
>>
>> I think people see something weird in Java that they don't understand,
>> and they immediately think "it's generics again."  Generics had some
>> really unfortunate consequences, especially in the long run, that I
>> don't think the expert group foresaw or completely understood.  (In
>> their defense, I'm sure they did as good as a job as possible at the
>> time.)
>
> Small question: What unfortunate consequence in respect to
> generics are people usually refering to? I hear something
> similar yesterday.


Oh god, where's my list?

The main issue, for me, is that generics are non-reifiable.  The entire 
generics system is a fiction maintained by the compiler only, and not 
accessible to the runtime JVM.

Creating generic arrays does not work.  This can be a problem when 
writing the guts of a generic class.

Due to erasure, you can't actually cast/type check a generic object. 
The compiler basically throws up its hands and says "sure I guess." 
Then you have to suppress the warning the compiler generates.

It can be extremely complicated to get the parametrized type of an object.

Basically you can look through the section on generics of Effective Java 
2nd ed and see a long list of complications.  The integration into Java 
wasn't (and isn't) really smooth.

Generics are also invariant, which is actually ok, just really confusing 
for folks who are used to covariant type systems.

Project Vahalla (OpenJDK, led by Brian Goetz) is looking at making 
generics reifiable.  It's a huge problem to do, but they're working on 
it just because the current implementation has enough weird corners that 
they want to fix it up.  That Oracle is going to spend the time and 
money to fix it tells you something about the current state of generics.




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


Thread

are lambdas a way to bring functional programming to java? gdotone@gmail.com - 2014-06-27 16:50 -0700
  Re: are lambdas a way to bring functional programming to java? Arne Vajhøj <arne@vajhoej.dk> - 2014-06-27 20:14 -0400
    Re: are lambdas a way to bring functional programming to java? Arne Vajhøj <arne@vajhoej.dk> - 2014-06-27 20:23 -0400
      Re: are lambdas a way to bring functional programming to java? Wanja Gayk <brixomatic@yahoo.com> - 2014-06-28 14:43 +0200
        Re: are lambdas a way to bring functional programming to java? markspace <markspace@nospam.nospam> - 2014-07-01 14:34 -0700
          Re: are lambdas a way to bring functional programming to java? Arne Vajhøj <arne@vajhoej.dk> - 2014-07-01 22:01 -0400
          Re: are lambdas a way to bring functional programming to java? Wanja Gayk <brixomatic@yahoo.com> - 2014-07-02 20:52 +0200
            Re: are lambdas a way to bring functional programming to java? markspace <markspace@nospam.nospam> - 2014-07-02 13:08 -0700
              Re: are lambdas a way to bring functional programming to java? Wanja Gayk <brixomatic@yahoo.com> - 2014-07-03 03:13 +0200
              Re: are lambdas a way to bring functional programming to java? Joerg Meier <joergmmeier@arcor.de> - 2014-07-06 14:42 +0200
        Re: are lambdas a way to bring functional programming to java? Arne Vajhøj <arne@vajhoej.dk> - 2014-07-01 22:27 -0400
          Re: are lambdas a way to bring functional programming to java? Arne Vajhøj <arne@vajhoej.dk> - 2014-07-01 22:32 -0400
            Re: are lambdas a way to bring functional programming to java? markspace <markspace@nospam.nospam> - 2014-07-01 19:58 -0700
            Re: are lambdas a way to bring functional programming to java? Wanja Gayk <brixomatic@yahoo.com> - 2014-07-02 22:55 +0200
              Re: are lambdas a way to bring functional programming to java? markspace <markspace@nospam.nospam> - 2014-07-02 15:32 -0700
                Re: are lambdas a way to bring functional programming to java? Gene Wirchenko <genew@telus.net> - 2014-07-03 09:45 -0700
          Re: are lambdas a way to bring functional programming to java? leif.roar@invalid.com (Leif Roar Moldskred) - 2014-07-01 23:48 -0500
            Re: are lambdas a way to bring functional programming to java? Wanja Gayk <brixomatic@yahoo.com> - 2014-07-02 22:55 +0200
              Re: are lambdas a way to bring functional programming to java? Gene Wirchenko <genew@telus.net> - 2014-07-03 09:49 -0700
                Re: are lambdas a way to bring functional programming to java? markspace <markspace@nospam.nospam> - 2014-07-03 10:25 -0700
                Re: are lambdas a way to bring functional programming to java? Gene Wirchenko <genew@telus.net> - 2014-07-04 11:03 -0700
          Re: are lambdas a way to bring functional programming to java? Wanja Gayk <brixomatic@yahoo.com> - 2014-07-02 21:23 +0200
      Re: are lambdas a way to bring functional programming to java? Roedy Green <see_website@mindprod.com.invalid> - 2014-06-30 09:08 -0700
        Re: are lambdas a way to bring functional programming to java? Arne Vajhøj <arne@vajhoej.dk> - 2014-07-01 21:56 -0400
  Re: are lambdas a way to bring functional programming to java? Joerg Meier <joergmmeier@arcor.de> - 2014-06-28 12:11 +0200
    Re: are lambdas a way to bring functional programming to java? Roedy Green <see_website@mindprod.com.invalid> - 2014-06-30 08:50 -0700
      Re: are lambdas a way to bring functional programming to java? markspace <markspace@nospam.nospam> - 2014-06-30 09:09 -0700
      Re: are lambdas a way to bring functional programming to java? Wanja Gayk <brixomatic@yahoo.com> - 2014-07-01 19:27 +0200
        Re: are lambdas a way to bring functional programming to java? Wanja Gayk <brixomatic@yahoo.com> - 2014-07-01 20:46 +0200
          Re: are lambdas a way to bring functional programming to java? Sebastian <news@seyweiler.dyndns.org> - 2014-07-01 21:52 +0200
            Re: are lambdas a way to bring functional programming to java? markspace <markspace@nospam.nospam> - 2014-07-01 14:11 -0700
              Re: are lambdas a way to bring functional programming to java? Jan Burse <janburse@fastmail.fm> - 2014-07-22 14:37 +0200
                Re: are lambdas a way to bring functional programming to java? markspace <markspace@nospam.nospam> - 2014-07-22 10:39 -0700
                Sidetrack on generics (WAS: Re: are lambdas a way to bring functional programming to java?) Daniele Futtorovic <da.futt.news@laposte.net> - 2014-07-22 20:48 +0200
                Re: Sidetrack on generics (WAS: Re: are lambdas a way to bring functional   programming to java?) Chris Riesbeck <Chris.Riesbeck@gmail.com> - 2014-07-23 12:01 -0500
      Re: are lambdas a way to bring functional programming to java? Arne Vajhøj <arne@vajhoej.dk> - 2014-07-01 21:50 -0400
  Re: are lambdas a way to bring functional programming to java? Roedy Green <see_website@mindprod.com.invalid> - 2014-07-22 04:40 -0700
  Re: are lambdas a way to bring functional programming to java? Roedy Green <see_website@mindprod.com.invalid> - 2014-07-28 09:45 -0700

csiph-web