The State of the Lambda: Libraries Edition

Home

News: The State of the Lambda: Libraries Edition

  1. The State of the Lambda: Libraries Edition (2 messages)

    Had lambda expressions (closures) been part of the Java language from the beginning, the Collection APIs would certainly look different than they do today. As the Java language acquires lambda expressions as part of JSR 335, this has the unfortunate side effect of making the Collections interfaces look even more out of date.

    While it might be tempting to start from scratch and build a replacement Collection framework ("Collections II"), replacing the Collection framework would be a major task, as the Collections interfaces permeate the JDK libraries. Instead, Java will pursue an evolutionary strategy of adding extension methods to existing interfaces (such as Collection,List, or Iterable), or perhaps to new interfaces (such as 'Stream') that are retrofitted onto existing classes, enabling many of the desired idioms without making people trade in their trusty ArrayLists and HashMaps.

    Read the full article: State of the Lambda: Libraries Edition

    Threaded Messages (2)

  2. This will be great to have in Java, saves a lot of code. I hope this JSR will become quickly available and that the open questions will be resolved shortly. Great article!

  3. too clever[ Go to top ]

    Sometimes closures are more clever than maintainable/understandable by somebody other than the author.  So I hope collections + lamda are an option not a requirement.